| GRIDPLUS2 - Optionset | ![]() |
||||||
|
| GRIDPLUS Optionset |
GRIDPLUS provides a command/mode to create GRIDPLUS optionsets. A GRIDPLUS optionset is simply a named set of options.
Optionsets can be very useful where you wish to use the same set of options for many GRIDPLUS elements. The optionset needs to be set only once (Probably as part of an application initialisation procedure/process), the optionset is then available for any part of the application.
Optionsets can save duplication of effort, make code more readable -and- make code easier to change as changing the optionset will change all GRIDPLUS elements using the optionset.
Example:-
gridplus optionset toolbar {
-style Toolbutton
-padding 0
-space 0
-takefocus 0
}
gridplus button .edit.toolbar -optionset toolbar {
{.save :filesave16 "?Save Record" !} {.close :fileclose16 "?Close"}
}
...is the same as...
gridplus button .edit.toolbar -style Toolbutton -padding 0 -space 0 -takefocus 0 {
{.save :filesave16 "?Save Record" !} {.close :fileclose16 "?Close"}
}