Difference between revisions of "BUTTON"
(Created page with "BUTTON widgets are commonly used as the primary user interface element for touchscreens. Buttons may be displayed with text or with a bitmap. {| class="wikitable" style="floa...") |
|||
Line 17: | Line 17: | ||
| style="font-weight:bold; font-size:12px; font-family:Arial, Helvetica, sans-serif !important;;" | Uses Memory Devices |
| style="font-weight:bold; font-size:12px; font-family:Arial, Helvetica, sans-serif !important;;" | Uses Memory Devices |
||
| style="font-size:12px; font-family:Arial, Helvetica, sans-serif !important;;" | No |
| style="font-size:12px; font-family:Arial, Helvetica, sans-serif !important;;" | No |
||
+ | |- |
||
+ | | style="font-weight:bold; font-size:12px; font-family:Arial, Helvetica, sans-serif !important;;" | Attached widgets |
||
+ | | style="font-size:12px; font-family:Arial, Helvetica, sans-serif !important;;" | None |
||
|} |
|} |
||
Revision as of 14:23, 13 July 2020
BUTTON widgets are commonly used as the primary user interface element for touchscreens. Buttons may be displayed with text or with a bitmap.
BUTTON | |
---|---|
Receives focus | Yes |
Skinnable | Yes |
OwnerDraw | No |
Uses Memory Devices | No |
Attached widgets | None |
Notification codes
The following events are sent from a BUTTON widget to its parent window as part of a WM_NOTIFY_PARENT message:
Message | Description |
---|---|
WM_NOTIFICATION_CLICKED | BUTTON has been clicked. |
WM_NOTIFICATION_RELEASED | BUTTON has been released. |
WM_NOTIFICATION_MOVED_OUT | BUTTON has been clicked and pointer has been moved out of the BUTTON widget without releasing. |
Keyboard reaction
The BUTTON widget reacts to the following keys if it has the input focus:
Message | Description |
---|---|
GUI_KEY_ENTER | If the key is pressed, the BUTTON reacts as it has been pressed and immediately released. |
GUI_KEY_SPACE | If the key is pressed, the BUTTON state changes to pressed. If the keys is released, the BUTTON state changes to unpressed. |
Samples
Below are links to samples that demonstrate, how to use BUTTON widgets in emWin.