Button class
Properties of the Button class:
Property | Explanation |
---|---|
checked | This property returns the state of the button, where by default, it is set to False. When this property is set to True, the button appears as though it is pressed. |
enabled | This property returns the availability of the button, where by default, it is set to True. When this property is set to False, the button is disabled and unavailable. This property allows you to write logic to test the state of the desktop application in order to disable or enable the button. For example, you might have a button that requires a data layer to be loaded in ArcMap before execution is possible. |
Functions of the Button class:
Function | Explanation |
---|---|
__init__(self) | This is a Python built-in function referred to as the constructor where some initial variables can be defined. By default, the checked and enabled properties of the button are initially set for you. |
onClick(self) | This function is called and executes your business logic when the button is clicked. |