gridview {on | off | add | delete | set | fetch=<s> | select},
id=<i>, panel=<i>, x=<i>, y=<i>, w=<i>, h=<i>, style=<i>, mode=<i>,
sort=<type>, align=<i>, row=<i>, column=<i>, size=<i>, title=<i>, header,
type=<i>, text=<s>, options=<string array>,
readonly
Function
Creates lists which are a collection of items, usually strings, which can have one or more columns. Eagle allows creation of list views control to visualize lists with vertical layout. This organization works considering data sets as rows (or lines) and not columns. Lists differ from other types of controls in that, the instruction used to insert a list object into a panel is the “list” command and not the more frequently used “tab” file.
Parameters
|
on |
(default) Create the grid |
|
off |
Destroy a grid |
|
add |
Add row or column |
|
delete |
Delete row or column |
|
set |
Set the content of a cell |
|
fetch |
Get the content of a cell, row, column or multi-selection area. This field requires an Eagle variable to save the appropriately formatted resulting string. |
|
select |
Select a cell, a row, a column or the entire grid |
|
id |
Grid identifier |
|
panel |
(only with the on primer) Panel id in which the grid will be created |
|
x |
X co-ordinate of the button in the menu |
|
y |
Y co-ordinate of the button in the menu |
|
w |
Width of the button |
|
h |
Height of the button |
|
style |
(only with the on primer) Define the grid behavior: · style= 1 (default) cell selection with header highlight on cursor tracking; · style=2 cell selection with complete highlight on cursor tracking; · style=3 row selection with header highlight on cursor tracking; · style=4 row selection with complete highlight on cursor tracking; · style=5 column selection with header highlight on cursor tracking; · style=6 column selection with complete highlight on cursor tracking; |
|
mode |
1. Creating a grid (on primer) Enables the editing mode selection: · mode = 1 (default) F2 · mode = 2 Double click with left button · mode = 3 F2 + double click with left button 2. Adding a column (add for column) Enables creation of column as read only: · mode = 0 (default) cells readable and writable · mode = 1 read-only cell |
|
sort |
(only with the on primer) String that defines the sorting behavior: · none (default) sorting disabled · column enable sort only for columns · row enable sort only for rows · all enable all sort types |
|
align |
(only with the add primer for column) Setting the content alignment in the columns cells: · align=1 left · align=2 center · align=3 right |
|
column |
1-based value that indicates the column index (1 based) or determinates the position in which the column will be added or removed; A special behavior is related to column = -1: · adding a column, the new column will be appended to the end; · removing columns, each columns will be deleted; |
|
row |
1-based value that indicates the row index or determines the position in which a row will be added or removed; A unique behavior is related to row = -1: · adding a row, the new row will be appended to the end; · removing rows, each row will be deleted; |
|
size |
(only with the add primer) The dimension of the new column (width) or a new row (height) |
|
title |
(only with the add primer) Contains the text to insert in the header of the row or column. Note in the case of a row the title will be displayed if the header parameter is applied |
|
header |
(only with the add primer for row) When applied, indicates that the text inside the header is defined using the title parameters. If the header is not included in the row definition, the header will display the index of the row, like Microsoft Excel |
|
type |
(only with the add primer for column) Define the type of the cells in new columns. Developers can choose between various types:
|
|
text |
(only with the set primer) String to be assigned a specific cell. The content depends on the cell type:
image.bmp or type#image.bmp The display mode can assume the following value: · a : (default)picture adopts column alignment · t : picture is tiled · s : picture is stretched |
|
options readonly |
(only with the set primer in a combo box cell) String array containing the combo box options When adding a column (“add” for column) it enables the creation of a column as “read only”: |
Please refer to the UI Framework documentation for details about the various valid combinations of primers usage with this command for creation, adding, deleting and so forth either all or part s of the gridview control..
Examples
gridview on, id=1, pan=3, x=10, y=10, w=400, h=150, style=2, mode=2
gridview on, id=2, pan=3, x=10, y=210, w=400, h=150, style=6, mode=2, sort=all
gridview id=1, add, col=3, title='Address',type=3,size=60
gridview id=1, add, col=-1, title='City',type=4,size=60,align=2
gridview id=2, add, row=3, title='Three',size=20
gridview id=1, add, row=-1, title='One',size=20,header
gridview id=1, del, col=4
gridview id=1, del, row=1
string cells[100]
gridview id=2,row=1, col=1,fetch=cells[1]
Notes
Lists are influenced by the currently selected THEME.
Previous Eagle versions created a lists as an independent control (that is, in a floating dialog) or as a child of a panel; now, with the UI Framework, the legacy approach has been depreciated
Note that if the panel is deleted, then any lists owned by the panel will also be deleted.
See also
NOTAT, panel, polling, UI Framework documentation, Theme, gridview