| Directives |
|
| *Note* | These formats also apply to Listview List Boxes and Treeview List Boxes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Formats |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | Use the LIST_BOX directive to create and control list boxes on the screen. A list box is used to display a preset series of selections or elements from which the user can choose. Depending on the implementation of OPT= and FMT= control options, the LIST_BOX directive can be used to create standard list boxes as well as the following list box types: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | A standard Windows list box can only use vertical scrollbars. However, you can use Listview list boxes or grids to incorporate horizontal scrollbars into applications. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Users
can select any element from a list of items you assign to
the list box, but variable input is not allowed. That is,
the user can only select - not enter - values. If you
need a list box that allows both variable input and
selection from a list, refer to VARLIST_BOX
Control List Box.
The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to dynamically read and alter a wide variety of control attributes (properties) directly from the programming language. Complete lists of the properties available for manipulating LIST_BOX, LISTVIEW, or TREEVIEW objects are described in Control Object Properties, . The following single character OPT= settings are used to refine list box definitions and to establish Listview controls (OPT="r" for Report Style or OPT="l" for List Style ), and Treeview controls (OPT="e"):
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 1 | Define/Create
List Box LIST_BOX ctl_id,@(col,ln,wth,ht)[,ctrlopt] Use this format to define or create a list box and give it a unique identifier in ctl_id. When a user selects an item from a list box, the item's associated ctl_id is used in generating a CTL value. Use an integer or numeric expression between -32000 and +32000 for the ctl_id. Depending on the implementation, the list box may also require some control options:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | Some of the settings (including OPT="r", OPT="l", and OPT="e") are used specifically for the creation of Listview List Boxes, and Treeview List Boxes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The
example below creates a list box that generates a CTL=100
when an item is selected from it and uses FNT=text
mode fixed font. The list box is loaded with the
items Dog, Cat, and Pig. The programmer writes Cat as the
initial/highlighted selection and removes Dog from the
top of the list.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | The LIST_BOX formats described below apply to all list box types. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 2 | Delete
Use the LIST_BOX REMOVE format to delete a list box. (To delete an individual element, use the LIST_BOX LOAD directive instead.) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 3 | Disable/Enable
Use the LIST_BOX DISABLE format to gray out a list box so that it will be visible but inaccessible to users. To reactivate it, use LIST_BOX ENABLE. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 4 | Set Focus
Use the LIST_BOX GOTO format to set the focus on a list box, ready for the next user action. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Formats 5, 6, and 7 | Load/Delete Use the LIST_BOX LOAD formats below to add or delete the elements in a list box. The formats set up the elements using a delimited string, an array of string elements or individually.
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.,
If loading data with images:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Place
the bitmap or icon filename in the data, enclosing the
path and filename in curly braces. Use a leading
exclamation point (!) to identify the image as internal,
or specify the relative path and filename to access an
image file that is external. For more information on
internal/external images and recognized image file types,
refer to Displaying Bitmaps/Icons.
ProvideX displays these images to the left of the related elements in the Treeview. Bitmaps or icons you define for the individual elements in LIST_BOX LOAD statements will override any default FMT= images in a LIST_BOX definition. For more information, see LIST_BOX OPT= Settings, Treeview List Boxes.
Load Via Array. When an array is loaded into a list box, the curly braces in {ALL} must be included in the syntax.
Load/Delete Index Element. When a list box is loaded one element at a time, the index value refers to the index before the element to be inserted. (Use a value of 1 to insert an element at the start of the list. If the value of the index is 0 (zero), the element will be appended to the end of the list.) If you have more elements on the data list than the physical screen size of the list box can display at one time, ProvideX automatically supplies vertical scrollbars. To remove or delete individual elements from the box, use LIST_BOX LOAD with an asterisk instead of the element string; e.g.,
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | When
a LIST_BOX LOAD is issued with no index the
current contents of the list box will first be cleared
and the new data will replace it. Using PxPlus the
'LoadPoint property can be set to a non-zero value to
alter this behaviour. If 'Loadpoint is set to -1, the
data included with the LIST_BOX LOAD will be appended to
the list box. If 'LoadPoint is set to a value > 0, the
data will be inserted into the list box at the point
specified and the value in 'LoadPoint will be reset. This functionality allows list boxes to load a block of records at a time. The 'LoadPoint property is a +PxPlus Exclusive (build 9182) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 8 | Find Element
Use a string variable to get the specific elements text from a list box. By passing a specific element number, you can retrieve the text of that element into a string variable
If the index value of zero (0) is used PxPlus will return the complete contents of the list box.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Formats 9 and 10 | Read Use LIST_BOX READ formats to read which element in the list box has been selected. The string variable mode$ returns a hex value showing how the element was selected. Possible values are described below:
Once this value is read, it is reset to $00$. ProvideX returns an EOM value and event when the user hits the Insert or Delete keys, Insert returns $2D$, Delete returns $2E$.
Read Current Selection. When you use LIST_BOX READ with a string variable, you can return the value of the currently selected element and the method used to make the selection (mode$).
Read Current Index. If you use LIST_BOX READ with a numeric variable, you can return the element by index and the user's method of selection (mode$) from the list box. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | If LIST_BOX READ includes an OPT="A" setting, all changes will have an effect on the EOM or mode$ value returned during the read. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Formats 11 and 12 | Write Current Selection Use the LIST_BOX WRITE formats to make the element the current selection, highlighted in the list box.
Write Selection. The string expression to write an element to a list box as the current selection must exactly match the value of one of the elements in the list box. Otherwise ProvideX returns Error #11: Record not found or Duplicate key on write. Writing Treeview data with bitmaps or icons. If you create a Treeview with OPT="!", then you can use LIST_BOX LOAD statements to define optional bitmaps or icons for individual elements of a Treeview. ProvideX displays the image to the left of the element. When you write the current selection, enclose the image filename in curly braces, preceding the individual data element; e.g.,
Bitmaps and icons you define for individual elements in LIST_BOX LOAD statements will override any FMT= images. For more information, see Format 1: Define/Create List Box and Treeview Format Options.
Write Index. You can write the current selection to a list box by using its index. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | A WRITE to the list box using an index of 0 (zero) will reset all highlighted lines. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 14 | Clear Current Selection
Use this format to clear the currently selected entry in a list box. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | This behavior can be altered by use of the '+N' & '-N' Mnemonics. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 15 | Set Focus Notification
Use the SET_FOCUS format to set an alternate CTL value to be generated whenever focus shifts to the list box. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 16 | Report All Changes
Use the LIST_BOX AUTO format to have ProvideX generate a CTL value automatically whenever the current selection is changed. Use this to track changes to the highlighted selection in a list box. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 17 | Hide/Show
With the LIST_BOX HIDE format, the list box remains active, but is not displayed. It is still accessible programmatically. Use the SHOW format to restore the display and user access. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Formatted List Boxes | Formatted
list boxes are created using the format definition
option in the LIST_BOX definition. The
information in the FMT=def$ string
expression describes each of the columns and/or rows.
Each column is formatted with an alignment code, usually
followed by a width in column units. The list of columns
is a space-separated string enclosed in
quotation marks. Each new row is delineated by a /slash.
The width in the format definition is the display/window width, not the number of characters in the text. Load the contents of the columns in a formatted list box from a delimited data string (positional data for the entries in the list box). The default delimiter is the SEP character (e.g., $8A$). To change this, use the SEP= option. Note that the value for the field delimiter (in this case, SEP) and the value signaling the end of row (in this case, $0A$) must be different. For the previous example:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| For data you want hidden, use S (with no length) as the alignment character to indicate that a column is to be skipped. (The data is present, but not displayed. The user can't see or gain access to the column.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | The maximum length of an element in a formatted list box is 255 bytes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Colour in a Formatted
List Box To change the colour of any field in a
formatted list box, simply prefix the data with one of
the mnemonics in the following chart.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Normally, background colours are dimmer than their respective foreground colours. If you want to use the background (dimmer) colour for foreground text, prefix the colour with the 'SB' (Set Background) mnemonic. If you want to use foreground colour brightness for the background, prefix the colour with the 'SF' (Set Foreground) mnemonic. All colours are reset to LIST_BOX default standards at the end of each column. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | This is not standard text plane colour handling. To get light gray background use 'SF'+'_WHITE' since '_WHITE' yields bright white. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The
following example creates a formatted list box using the
standard definition elements explained in the previous
section:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Listview List Boxes | Listview
list boxes are created by setting OPT=char$
in the definition. (See Format 1: Define/Create List Box). Two Listview styles are supported:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This
example show definitions for both Listview styles:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Multiple Bitmap Support | The
List View control also allows for the inclusion of
multiple bitmaps within the data along with a number of
new properties.
When a column starts with a 'PICTURE' mnemonic the system will insert the image associated with the mnemonic into the list view row. For Example The list box to the right was generated by the program shown below displays a check mark for those sales reps making over 100K and a Star for those over $500K NOTE: The position/size values within the 'PICTURE' mnemonic are ignored thus are generally set to zero. Also make sure all pictures used within a list view should be the same size. Text and bitmaps may be interspersed through the field contents allowing text to appear before and after the images.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | The unique logical identifier (ctl_id) assigned during the creation of a Listview list box can be used with the apostrophe operator to dynamically read and alter a wide variety of control attributes (properties). Available properties are described in Control Object Properties, . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Listview Format Options Use FMT= to define Listview column widths, titles and the placement of an optional bitmap or icon. You can include a series of space-separated column definitions with an optional column title [in square brackets], alignment code and width specification; e.g.,
Listview FMT=
settings can include the following |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Column Title | Enclosed in square brackets, the column title is placed ahead of the column alignment and width; e.g., ... [Company]L10. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Column Alignment and Width | Alignment
codes for left, right and center (L, R, C) are used as a
prefixes to the width (in
columns); e.g.,
indicates that column 1 is left justified and 10 columns wide. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bitmaps or Icons | To include a bitmap or icon to the left of a line, place the image filename in the format to identify the column. Enclose the image name in {curly braces} Use a leading exclamation point (!) to identify the image as internal, or specify the relative path and filename to access an image file that is external. For more information on internal/external images and recognized image file types, refer to Displaying Bitmaps/Icons. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Ensure
that all bitmaps or icons in the same LIST_BOX
control are the same size (mandatory). If you include
different sizes, ProvideX treats the size of the first
bitmap/icon as the size of all images for a given list
box. If you use internal bitmaps, ProvideX converts the
background light gray to match the background colour of
the LIST_BOX entries. Note: Internal ProvideX bitmaps are generally 20 pixels wide by 16 pixels high. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Numerical Column Sorting Code | Specialized codes for a Listview column that indicate the column data should be considered as numeric data and sorted according to the logical numerical value. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The
possible codes are as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Load
Listview data into the columns from SEP-delimited
data strings. For more information, see Format 6:
Load via Delimited String. In the following
example, ProvideX automatically supplies a horizontal
scrollbar, where the total width of the data columns is
greater than the list box display width:
The following chart
describes FMT= settings for line 0100in
the previous example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Colour in Listview (Report Style) Listview (Report Style) list box supports colours on a per column basis. Colour mnemonics can precede the data in the column or be intermixed with the data itself so more than one foreground/background colour can be set up per column. If a background colour mnemonic precedes all the data in a column, then the entire background of the column will be set to that colour. See Colour in a Formatted List Box. Row Highlighting in Listview (Report Style) Listview (Report Style) list box supports first column highlight (where the user must click on the first column to highlight the row) and full-line highlight (where the user can click on any column to highlight the row). You can set highlighting style for individual list boxes by using OPT= either "v" or "V" when you create the control object or you can control the highlighting style system-wide by setting the print Mnemonics '-V' and '+V'. For more information, refer to Format 1: Define/Create List Box and '+V' & '-V' Mnemonics. Example Listview (Report Style)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Treeview List Boxes | A
Treeview control object can be created by
setting OPT="e"in the definition of a list box.
(See Format
1:
Define/Create List Box.) Treeviews provide a
hierarchical view of the data, using a collapsible tree
structure to represent a list box. As items are loaded
into the Treeview, ProvideX automatically parses the
entries based on your given delimiter and creates all
intervening tree levels required. For instance, if you
use a slash as your delimiter and load the single entry
aaa/bbb/ccc, ProvideX will generate three entries in the
Treeview:
If you then load aaa/bbb/ddd, ProvideX only creates one new entry for aaa/bbb/ddd (since aaa and aaa/bbb already exist). If you add aaa/xxx/iiid, ProvideX creates two new entries: one for aaa/xxx and one for aaa/xxx/iii. When an item from a branch is selected, the list box READ returns the item, including its parent branches. In the example above, selecting ccc would return
When loading a Tree view with lots of data, it is often advisable to pre-sort the data and load the tree view without the sort option enabled. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | The unique logical identifier (ctl_id) assigned during the creation of a Treeview list box can be used with the apostrophe operator to dynamically read and alter a wide variety of control attributes (properties). Available properties are described in Control Object Properties, . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| As
mentioned earlier, OPT="e" establishes a
Treeview definition. Several other OPT= settings can be used
to refine the definition: "!" (bitmaps or
icons), "|" (show
connecting lines), "b" (suppress
expansion/collapse buttons); "E" (enable
automatic editing), "q"(disable sorting). For
complete descriptions, see LIST_BOX OPT= Settings.
Use FMT= settings to define default images to be displayed in the tree (optional). When adding bitmaps and icons, enclose the image name in curly braces. Use a leading exclamation point (!) to identify the image as internal, or specify the relative path and filename to access an image file that is external. For more information on internal/external images and recognized image file types, refer to Displaying Bitmaps/Icons. Filenames are mandatory in FMT={images$}clauses. Place them inside curly braces in a pipe-separated list; e.g.,
Null values in FMT={images$}are not allowed. For instance, FMT={||Pig.bmp} generates an Error #23: Missing/Invalid variable.) Ensure that all bitmaps or icons in the same LIST_BOX control are the same size (mandatory). If you include different sizes, ProvideX treats the size of the first bitmap/icon as the size of all images for a given list box. If you use internal bitmaps, ProvideX converts the background light gray to match the background colour of the LIST_BOX entries. You can define up to six default bitmaps or icons in Treeviews. The order of the images determines when they are used:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | When OPT="e,!" (Treeview data has bitmaps or icons), any images you set up for individual elements in Treeview LIST_BOX LOAD and WRITE statements will override the default FMT= bitmap or icon for the individual element. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example Treeview
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tip: Use SEP=DLM when reading directories to have ProvideX append the operating system delimiter to subdirectory names. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||