Class: HinnerSplittedDialogTitled
- Inherits:
-
HinnerSplittedDialog
- Object
- TkFrame
- HinnerDialog
- HinnerSplittedDialog
- HinnerSplittedDialogTitled
- Defined in:
- lib/a-tkcommons.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#hinner_frame ⇒ Object
Returns the value of attribute hinner_frame.
-
#titled_frame ⇒ Object
Returns the value of attribute titled_frame.
Attributes inherited from HinnerSplittedDialog
Instance Method Summary collapse
- #do_close ⇒ Object
-
#initialize(title = nil, side = 'top', height = 100, args = nil) ⇒ HinnerSplittedDialogTitled
constructor
A new instance of HinnerSplittedDialogTitled.
- #on_close=(_proc) ⇒ Object
Methods inherited from HinnerSplittedDialog
Methods inherited from HinnerDialog
#is_modal?, #make_scrollable_frame, #release, #show_modal
Constructor Details
#initialize(title = nil, side = 'top', height = 100, args = nil) ⇒ HinnerSplittedDialogTitled
Returns a new instance of HinnerSplittedDialogTitled.
3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 |
# File 'lib/a-tkcommons.rb', line 3377 def initialize(title=nil, side='top', height=100, args=nil) super(side, height, args) @titled_frame = TkLabelTitledFrameClosable.new(self.frame, title).place('x'=>0, 'y'=>0,'relheight'=>1, 'relwidth'=>1) @ext_proc = nil close = proc{ do_close #self.destroy #Tk.callback_break } @titled_frame.add_close_action(close) @hinner_frame = @titled_frame.frame #@hinner_frame = make_scrollable_frame(@titled_frame.frame) #@hinner_frame = Tk::ScrollFrame.new(@titled_frame.frame).place('x'=>0, 'y'=>0, 'relheight'=>1, 'relwidth'=>1).baseframe end |
Instance Attribute Details
#hinner_frame ⇒ Object
Returns the value of attribute hinner_frame.
3376 3377 3378 |
# File 'lib/a-tkcommons.rb', line 3376 def hinner_frame @hinner_frame end |
#titled_frame ⇒ Object
Returns the value of attribute titled_frame.
3376 3377 3378 |
# File 'lib/a-tkcommons.rb', line 3376 def titled_frame @titled_frame end |
Instance Method Details
#do_close ⇒ Object
3392 3393 3394 3395 3396 |
# File 'lib/a-tkcommons.rb', line 3392 def do_close @ext_proc.call if !@ext_proc.nil? self.destroy Tk.callback_break end |
#on_close=(_proc) ⇒ Object
3398 3399 3400 |
# File 'lib/a-tkcommons.rb', line 3398 def on_close=(_proc) @ext_proc = _proc end |