Difference between revisions of "LISTVIEW"
Line 1: | Line 1: | ||
− | LISTVIEW widgets are used to select one element of a list with several columns. To manage the columns a LISTVIEW widget contains a HEADER widget. As items in a LISTVIEW are selected, they appear highlighted. Note that the background color of a selected item depends on whether the LISTVIEW window has input focus. |
+ | LISTVIEW widgets are used to select one element of a list with several columns. To manage the columns a LISTVIEW widget contains a [[HEADER widget]]. As items in a LISTVIEW are selected, they appear highlighted. Note that the background color of a selected item depends on whether the LISTVIEW window has input focus. |
{| class="wikitable" style="float:right; margin-left: 10px; background-color: #f9f9f9; width: 15%;" |
{| class="wikitable" style="float:right; margin-left: 10px; background-color: #f9f9f9; width: 15%;" |
Revision as of 11:01, 14 July 2020
LISTVIEW widgets are used to select one element of a list with several columns. To manage the columns a LISTVIEW widget contains a HEADER widget. As items in a LISTVIEW are selected, they appear highlighted. Note that the background color of a selected item depends on whether the LISTVIEW window has input focus.
LISTVIEW | |
---|---|
Receives focus | Yes |
Skinnable | No |
OwnerDraw | Yes |
Uses Memory Devices | No |
Attached widgets |
Notification codes
The following events are sent from a LISTVIEW widget to its parent window as part of a WM_NOTIFY_PARENT message:
Message | Description |
---|---|
WM_NOTIFICATION_CLICKED | LISTVIEW has been clicked. |
WM_NOTIFICATION_RELEASED | LISTVIEW has been released. |
WM_NOTIFICATION_MOVED_OUT | LISTVIEW has been clicked and pointer has been moved out of the LISTVIEW widget without releasing. |
WM_NOTIFICATION_SCROLL_CHANGED | The scroll position of the optional scroll bar has been changed. |
WM_NOTIFICATION_SEL_CHANGED | The selection of the list box has changed. |
Keyboard reaction
The LISTVIEW widget reacts to the following keys if it has the input focus:
Message | Description |
---|---|
GUI_KEY_UP | Moves the selection bar up. |
GUI_KEY_DOWN | Moves the selection bar down. |
GUI_KEY_RIGHT | If the total amount of the column width is bigger than the inside area of the LISTVIEW, the content scrolls to the left. |
GUI_KEY_LEFT | If the total amount of the column width is bigger than the inside area of the LISTVIEW, the content scrolls to the right. |
GUI_KEY_PGUP | Moves the selection one page up. |
GUI_KEY_PGDOWN | Moves the selection one page down. |
GUI_KEY_HOME | Moves the selection to the first element of the list. |
GUI_KEY_END | Moves the selection to the last element of the list. |
Samples
Below are links to samples that demonstrate how to use LISTVIEW widgets in emWin.