ProvideX V8.20 > Language Reference > 2. Directives
183
Format 4: Hide/Show
LIST_BOX {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the LIST_BOX HIDE format, the list box remains active, but is not displayed. It is
still accessible programmatically. Use SHOW to restore the display and user access.
Format 5: Force Focus
LIST_BOX GOTO ctl_id[,ERR=stmtref]
Use the LIST_BOX GOTO format to reactivate and force focus to a list box, ready for the
next user action.
Format 6: Signal on Focus
LIST_BOX SET_FOCUS ctl_id,alt_ctl,[,ERR=stmtref]
Use the LIST_BOX SET_FOCUS format to define an alternate CTL value to generate
whenever focus shifts to the list box.
Formats 7, 8, and 9: Load/Delete
Use the LIST_BOX LOAD formats below to add or delete the elements in a list box.
These formats set up the elements using a delimited string, an array of string
elements or individually.
LIST_BOX LOAD ctl_id,dlm_list$[,ERR=stmtref]
Load Via Delimited String. When you load elements into a list box from a delimited
string, the last character in the string must be a delimiter. That ending delimiter must
be identical to the separator between the elements in the string; e.g.,
LIST_BOX LOAD 11000,"Fox/Cat/Dog/Cow/Sheep/Horse/Pig/Elephant/Ant/"
LIST_BOX LOAD 15000,"Fox"+SEP+"Cat"+SEP+"Dog"+SEP
Loading Data with Images
Bitmaps or icons can be included with data elements that are being loaded in a list
view or tree view list box; however, the syntax for loading these images depends on
the type of listbox created.
When a List View is created (OPT="l"), use control options FMT="{}" and
SEP="," to include images. The syntax is similar to the following:
0010 LIST_BOX 10,@(10,10,50,10),OPT="l",FMT="{}",SEP=","
0030 LIST_BOX LOAD 10,"!Stop,Cat/!File,Dog/!Checkmark,Pig/"
For a Report View (OPT="r") use syntax similar to the following:
0010 LIST_BOX 10,@(10,10,50,10),OPT="r",FMT="{}[Col1]L10 [Col2]L10",SEP=","
0030 LIST_BOX LOAD 10,"!Stop,a,b/!Print,c,d/!Checkmark,e,f/"