Class: TT::GUI::Button
Overview
Events
-
:click
Direct Known Subclasses
Instance Attribute Summary collapse
Attributes inherited from Control
#bottom, #font_bold, #font_italic, #font_name, #font_size, #height, #left, #name, #parent, #right, #tooltip, #top, #ui_id, #width, #window
Instance Method Summary collapse
- #custom_properties ⇒ TT::JSON
-
#initialize(caption, &on_click) ⇒ Button
constructor
A new instance of Button.
Methods inherited from Control
#add_event_handler, #call_event, #disabled=, #disabled?, #enabled=, #enabled?, events, has_event?, #inspect, #move, #position, #positioned?, #properties, #release!, #size
Methods included from ControlEvents
Constructor Details
#initialize(caption, &on_click) ⇒ Button
Returns a new instance of Button
548 549 550 551 552 553 554 555 556 557 558 559 560 |
# File 'TT_Lib2/gui.rb', line 548 def initialize( , &on_click ) super # Defaults # http://msdn.microsoft.com/en-us/library/aa511279.aspx#controlsizing # http://msdn.microsoft.com/en-us/library/aa511453.aspx#sizing # Actual: 75x23 # Visible: 73x21 @width = 73 @height = 21 # User Properties @caption = add_event_handler( :click, &on_click ) end |
Instance Attribute Details
#caption ⇒ Object
539 540 541 |
# File 'TT_Lib2/gui.rb', line 539 def @caption end |