A bitmap button is a control that contains a bitmap.
It may be placed on a dialog box or panel, or indeed
almost any other window.
A bitmap button can be supplied with a single bitmap, and Widgets will draw
all button states using this bitmap. If the application needs more
control, additional bitmaps for the selected state, unpressed focused
state, hover state and and greyed-out disabled state may be supplied.
BU_AUTODRAW |
Ifthis is specified, the button will be drawn automatically using the label bitmap only, providinga 3D-look border. If this style is not specified, the button will be drawn without borders and using allprovided bitmaps. WIN32 only. |
BU_LEFT |
Left-justifies the bitmap label. WIN32 only. |
BU_TOP |
Aligns the bitmap label to the top of the button. WIN32 only. |
BU_RIGHT |
Right-justifies the bitmap label. WIN32 only. |
BU_BOTTOM |
Aligns the bitmap label to the bottom of the button. WIN32 only. |
Note that BU_EXACTFIT
supported by
Button is not used by this class as bitmap buttons
don’t have any minimal standard size by default.
See also window styles overview.
evt_button(id) { | event | … } | Process a EVT_COMMAND_BUTTON_CLICKED event,when the button is clicked. |
The bitmap parameter is normally the only bitmap you need to provide, and Widgets will
draw the button correctly in its different states. If you want more control, call
any of the functions
BitmapButton#set_bitmap_selected,
BitmapButton#set_bitmap_focus,
BitmapButton#set_bitmap_hover, BitmapButton#set_bitmap_disabled.
Note that the bitmap passed is smaller than the actual button created.
BitmapButton#create, Validator
Button creation function for two-step creation. For more details, see BitmapButton.new.
Returns the bitmap for the disabled state.
BitmapButton#set_bitmap_disabled
Returns the bitmap for the focused state.
Returns the bitmap for the focused state.
Returns the label bitmap (the one passed to the constructor).
Returns the bitmap for the selected state.
BitmapButton#set_bitmap_selected
Sets the bitmap for the disabled button appearance.
BitmapButton#get_bitmap_disabled, BitmapButton#set_bitmap_label, BitmapButton#set_bitmap_selected, BitmapButton#set_bitmap_focus
Sets the bitmap for the button appearance when it has the keyboard focus.
BitmapButton#get_bitmap_focus, BitmapButton#set_bitmap_label, BitmapButton#set_bitmap_selected, BitmapButton#set_bitmap_disabled
Sets the bitmap for the button appearance when it has the keyboard focus.
BitmapButton#get_bitmap_focus, BitmapButton#set_bitmap_label, BitmapButton#set_bitmap_selected, BitmapButton#set_bitmap_disabled
Sets the bitmap label for the button.
This is the bitmap used for the unselected state, and for all other states
if no other bitmaps are provided.
Sets the bitmap for the selected (depressed) button appearance.
BitmapButton#get_bitmap_selected, BitmapButton#set_bitmap_label, BitmapButton#set_bitmap_focus, BitmapButton#set_bitmap_disabled
[This page automatically generated from the Textile source at 2023-06-03 08:07:40 +0000]