GRIDPLUS2 - Reference | ![]() |
||||||
|
GRIDPLUS Commands/Modes |
Note: If you are new to GRIDPLUS read the grid reference first.
The main GRIDPLUS command has the following format:-
gridplus::gridplus mode ?option value(s) ...? ?layout?
The modes available are:-
add | Add non-Gridplus widget to Group. | |
button | Create Grid of buttons. | |
calendar | Create a calendar. | |
checkbutton | Create Grid of checkbuttons. | |
clear | Clear specified window. | |
container | Create a GRIDPLUS container. | |
date | Create a Grid of dropdown date selectors. | |
define | Define GRIDPLUS widgets (optional). | |
dropdown | Create a Grid of dropdowns (comboboxes). | |
entry | Create Grid of entries. | |
goto | Goto specified label in tagged text display. | |
grid | Create GRIDPLUS Grid. | |
layout | Create GRIDPLUS Layout. | |
line | Create line. | |
link | Create Grid of links. | |
menu | Create menubar. | |
menubutton | Create a Grid of menubuttons. | |
notebook | Create notebook. | |
optionset | Create an option-set. | |
pack | Pack layout for resizable windows. | |
pane | Create a paned window. | |
radiobutton | Create Grid of radiobuttons. | |
set | Set GRIDPLUS options. | |
spinbox | Create Grid of spinboxes. | |
tablelist | Create scrollable tablelist. | |
text | Create scrollable text. | |
tree | Create scrollable tree. | |
widget | Create Grid of widgets. | |
window | Create toplevel window and set window options. |
The following GRIDPLUS commands are used to set/unset the values of GRIDPLUS items/widgets:-
gridplus::gpdelete item ?options?
gridplus::gpdelete item ?options? ?|? ?column? match|index|line|node
gridplus::gpinsert item position value
gridplus::gpmap itemlist valuelist
gridplus::gpmap itemlist elementlist array
gridplus::gpmap itemlist keylist dict
gridplus::gpselect item ?options? match|index|node|date ?column?
gridplus::gpselect item ?options? | ?column? match
gridplus::gpset ?options? item value
gridplus::gpset {item value ...}
gridplus::gpupdate item ?options? rowdata
gridplus::gpupdate item ?options? | column value
gridplus::gpupdate item ?options? | column match | rowdata
gridplus::gpupdate item ?options? | column match | column value
gridplus::gpunset {item ...}
The following GRIDPLUS commands are used to perform clipboard operations to text and entry widgets:-
gridplus::gpclear ?item?
gridplus::gpcopy ?item?
gridplus::gpcut ?item?
gridplus::gppaste ?item?
The following GRIDPLUS commands are used to perform find operations on text widgets.
gridplus::gpfind item string ?direction?
gridplus::gpfind_dialog ?item?
The following GRIDPLUS commands are used to perform SQL (TDBC) database queries and map/return the result.
gridplus::gpdb window query ?tablelist|prefix|dict|=?
gridplus::gpdb window query foreach body ?prefix?
The following GRIDPLUS command is used to navigate text and calendar widgets.
gridplus::gpnav item target ?increment?
The following GRIDPLUS command can be used to perform basic date calculations.
gridplus::gpdate ?action? ?date?
The following GRIDPLUS command can be used to simplify setting of Option Database options.
gridplus::gpoptions {option value ...}
GRIDPLUS Generated Widget/Command Names |
Widget Names:
grid_name,widget_id
grid_name | Name of grid. |
widget_id | Widget ID without leading dot. |
Examples assuming an entry with ID ".firstname" in grid ".person":-
Main/Root Window: | .person,firstname |
Toplevel Window: | .mywindow.person,firstname |
Command/Callback Names:
grid,widget_id
...or...
toplevel:grid,widget_id
grid | Name of grid without leading dot. |
toplevel | Name of toplevel window without leading dot. |
widget_id | Widget ID without leading dot. |
Examples assuming a button with ID ".saveperson" in grid ".actions":-
Main/Root Window: | actions,saveperson |
Toplevel Window: | mywindow:actions,saveperson |
Tablelist, Text and Tree Names:
It maybe neccessary to reference Tablelist, Text or Tree widgets directly in order to get information about the widget -or- to set an attribute not available through GRIDPLUS.
GRIDPLUS uses a simple widget naming scheme which makes this easy.
Examples assuming a GRIDPLUS widget called ".mywidget" of each of the above types:-
Tablelist: | .mywidget.tablelist |
Text: | .mywidget.text |
Tree: | .mywidget.tree |
For example: To get the number of rows in a tablelist:-
.mywidget.tablelist size