A button is a panel item that contains a text string or bitmap, and is one of the commonest elements of a GUI. It may be placed on a wx:panel% object or a wx:dialog-box% object.
Whenever a button is clicked by the user, the buttons's callback procedure is invoked. (The callback procedure is provided as an initialization argument when the button is created.)
Creates a button with a text or bitmap label. The label string can mark a character of the label as the Windows shortcut by preceding the key with an ampersand (``&''). Ampersands are stripped from label before it is used as a label. Double ampersands are converted to a single (unstripped) ampersand. If label is a bitmap, then the bitmap must be valid and not selected into a wx:memory-dc% object.
If func is not null, it is used as the callback for the button when the button is pressed.
The parameters x and y are used to specify an absolute position for the button within the panel; if -1 is provided, a default position will be assigned such that the button is placed next to the last item inserted into the panel. If width or height is -1, an appropriate size will be used for the button based on the button name.
The style argument is reserved for future use.
The name argument is used to associate a name with the button, allowing the application user to set X Windows resource values for each individual button.