wxtool
Description
A wxtool object represents an entry on a tool bar and when selected will normally cause an event to occur in the program. Tools are buttons that have a bitmap and optionally a disabled bitmap.
Type Tags
None
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. |
bitmap | wxbitmap | The bitmap that is shown representing the tool on the tool bar. |
disabledbitmap | wxbitmap | The bitmap that is shown representing the tool on the tool bar if the tool is disabled. |
enabled | boolean | Specifies whether or not the tool is enabled. |
name | string | The name of the tool, to allow it to be referenced using the member operator (!). |
next | wxtool | This property holds a reference to the next tool. All tools for a given tool bar are in a ring. |
onclick | event | An event that is triggered every time the user clicks on the tool. |
toolbar | wxtoolbar | This property holds a reference to the tool bar that contains the tool. |
tooltip | string | Contains the test that is displayed as a tooltip for the tool. |
type | type | Specifies the wxtool type object. |
Methods
setenabled()
Description
Sets the enabled state of the tool. The wxtool object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxtoolvar
.setenabled
(
boolean
)
enabled
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
enabled | None | boolean | The desired enabled state for the tool. |
settooltip()
Description
Sets the text for the tooltip associated with the tool. The wxtool object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxtoolvar
.settooltip
(
string
)
tooltip
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
tooltip | None | string | The new text to set for the tooltip. |