wxformbitmapbutton
Description
A wxformbitmapbutton object is a push button on a form that the user clicks to perform some action.
Type Tags
wxformcontrol
Object Value
Properties
Property | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
_ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. | ||||||||||
__ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property. | ||||||||||
backgroundrgb | rgb | Gives the color of the background of the button control. | ||||||||||
bitmap | wxbitmap | The wxbitmap object that is used as the source of the bitmap on the button. | ||||||||||
captureable | boolean |
Specifies whether or not the control events can be captured by the form when
the controlcapture() method is called.
| ||||||||||
disabledbitmap | wxbitmap | The wxbitmap object that is used as the source of the bitmap on the button that is displayed when the button is disabled. | ||||||||||
enabled | boolean | Specifies whether or not the control is enabled. | ||||||||||
focusable | boolean |
Specifies whether or not the control can have the input focus. For
wxformbutton objects this is always
.true
| ||||||||||
focusbitmap | wxbitmap | The wxbitmap object that is used as the source of the bitmap on the button when the button has focus. | ||||||||||
form | wxform | Specifies the wxform object to which this control belongs. | ||||||||||
height | integer | Gives the height of the control, in pixels. | ||||||||||
left | integer | Gives the position of the left side of the control relative to the left side of the form, in pixels. | ||||||||||
name | string | The name of the wxformbitmapbutton object. | ||||||||||
next | type(wxformcontrol) |
Specifies the next wxformcontrol on the same form.
| ||||||||||
onclick | event | An event that is triggered every time the user clicks the button. The event handling function will receive the following parameters: (wxformbitmapbutton me[, type(*) reference]). The reference is only passed if it is provided by the user. | ||||||||||
ongotfocus | event | An event that is triggered when the button receives input focus. The event handling function will receive the following parameters: (wxformbitmapbutton me[, type(*) reference]). The reference is only passed if it is provided by the user. | ||||||||||
onlostfocus | event | An event that is triggered when the button loses input focus. The event handling function will receive the following parameters: (wxformbitmapbutton me[, type(*) reference]). The reference is only passed if it is provided by the user. | ||||||||||
onmouse | event |
An event that is triggered each time a mouse event occurs that matches
the bits set in the onmousemask property. The
onmouse event handling function should be defined as follows:
| ||||||||||
onmousemask | integer | Holds the mask that decides which mouse events are captured and sent to the onmouse event handler. | ||||||||||
selectedbitmap | wxbitmap | The wxbitmap object that is used as the source of the bitmap on the button that is displayed when the button is pressed. | ||||||||||
tooltip | string | Contains the test that is displayed as a tooltip for the control. | ||||||||||
top | integer | Gives the position of the top edge of the control relative to the top edge of the form, in pixels. | ||||||||||
type | type | Specifies the wxformbitmapbutton type object. | ||||||||||
visible | boolean | Specifies whether or not the control is visible. | ||||||||||
width | integer | Gives the width of the control, in pixels. |
Methods
remove()
Description
Removes the control from the form. If any object has a reference to the control, those references will no longer be valid. It is not safe to attempt to use a control after this method has been called.
Prototype
wxformbitmapbuttonvar
.remove
()
Parameters
None
setbackgroundrgb()
Description
Sets the background color of the button control. The
wxformbitmapbutton object itself is returned, to allow
multiple setting methods to be put into one expression. It is an
error to specify both the rgb
argument and one or
more of the red
, green
or
blue
arguments.
Prototype
wxformbitmapbuttonvar
.setbackgroundrgb
(
integer
,
integer rgb
,
integer red
,
integer green
)
blue
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
rgb | The current value of the backgroundrgb
property | integer | The new background color of the button control. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. |
red | The current value of the backgroundrgb.red
property | integer | The red component in the new background color of the button control. This must be between 0 and 255 inclusive. |
green | The current value of the backgroundrgb.green
property | integer | The green component in the new background color of the button control. This must be between 0 and 255 inclusive. |
blue | The current value of the backgroundrgb.blue
property | integer | The blue component in the new background color of the button control. This must be between 0 and 255 inclusive. |
setbitmaps()
Description
Sets the various bitmaps associated with the control. It is not possible to
set a bitmap to .nul
once it has been assigned. It
is possible to change its assignment though. Any of the parameters
can be provided to change one or more bitmaps at the same time. The
wxformbitmapbutton object itself is returned, to allow
multiple setting methods to be put into one expression.
Prototype
wxformbitmapbuttonvar
.setbitmaps
(
wxbitmap
,
wxbitmap bitmap
,
wxbitmap selectedbitmap
,
wxbitmap disabledbitmap
)
focusbitmap
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
bitmap | The current value of the bitmap property | wxbitmap | The wxbitmap object to be assigned as the source of the bitmap on the button. |
selectedbitmap | The current value of the selectedbitmap
property | wxbitmap | The wxbitmap object to be assigned as the source of the bitmap on the button shown when the button is selected. |
disabledbitmap | The current value of the disabledbitmap
property | wxbitmap | The wxbitmap object to be assigned as the source of the bitmap on the button shown when the button is disabled. |
focusbitmap | The current value of the focusbitmap property | wxbitmap | The wxbitmap object to be assigned as the source of the bitmap on the button shown when the button has focus. |
setcaptureable()
Description
This method is used to determine whether the events for the control can be captured and passed to the form or not. By default, events can be captured.
Prototype
wxformbitmapbuttonvar
.setcaptureable
(
boolean
)
captureable
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
captureable | None | boolean |
Sets whether or not the events for this control can be captured by the form
using the controlcapture() method of the
form.
|
setenabled()
Description
Sets the enabled state of the button. The wxformbitmapbutton object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformbitmapbuttonvar
.setenabled
(
boolean
)
enabled
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
enabled | None | boolean | The desired enabled state for the button control. |
setfocus()
Description
Sets focus to the control, provided that it is not invisible or disabled. If this is called for a form that is not yet in a container, then nothing will happen except that the focuscontrol of the wxform object will be set. Once the form is placed in a container, the control will get focus and the ongotfocus event will fire.
Prototype
wxformbitmapbuttonvar
.setfocus
()
Parameters
None
setname()
Description
Sets the name of the button. The wxformbitmapbutton object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformbitmapbuttonvar
.setname
(
string
)
name
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
name | None | string | The new name for the button control. |
setnext()
Description
Sets the position of the control in the z-order and tab order.
Prototype
wxformbitmapbuttonvar
.setnext
(
type(wxformcontrol)
)
next
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
next | None | type(wxformcontrol) |
Calling the method with the value .nul sets a control to be
the last one in the ring (the one before form.firstcontrol) and
so has the highest z-order, and passing any other control as the
argument puts the target control immediately below the one
specified as the parameter. The visible stacking of controls on a
form is such that the earliest in the ring is the furthest back
in the z-order.
|
setonmousemask()
Description
Sets the mask that is used to decide which mouse events will be trapped for the control. The wxformbitmapbutton object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformbitmapbuttonvar
.setonmousemask
(
integer
)
onmousemask
Parameters
Parameter | Default value | Type name | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
onmousemask | None | integer |
The definition of which events should be handled by the onmouse event
handler. The
|
setposition()
Description
Sets the size and/or position of the button. The wxformbitmapbutton object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformbitmapbuttonvar
.setposition
(
integer
,
integer left
,
integer top
,
integer width
)
height
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
left | The current value of the left property | integer | The new position of the left side of the button on the form. |
top | The current value of the top property | integer | The new position of the top edge of the button on the form. |
width | The current value of the width property | integer | The new width of the button on the form. |
height | The current value of the height property | integer | The new height of the button on the form. |
settooltip()
Description
Sets the text for the tooltip associated with the control. The wxformbitmapbutton object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformbitmapbuttonvar
.settooltip
(
string
)
tooltip
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
tooltip | None | string | The new text to set for the tooltip. |
setvisible()
Description
Sets the visibility of the button. The wxformbitmapbutton object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformbitmapbuttonvar
.setvisible
(
boolean
)
visible
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
visible | None | boolean | The desired visibility of the button control. |