FORMAT() Other List Box Properties

Top  Previous  Next

The following properties are not part of the FORMAT attribute string, but may be used to dynamically affect the appearance of the LIST or COMBO control.

PROPLIST:BackColor

An array property that sets or returns the default background color for the text in the column number specifed as the array element. This coloring can be overridden on a per-cell basis by the standard cell coloring mechanism.

PROPLIST:BackSelected

An array property that sets or returns the default selected background color for the text in the column number specifed as the array element. This coloring can be overridden on a per-cell basis by the standard cell coloring mechanism.

PROPLIST:BarFrame

An array property that sets or returns the default color of the frame of the selection bar in the column number specifed as the array element:

 

?List{PROPLIST:BarFrame,2} = COLOR:Red

!Set Selection Frame of second column to RED

?List{PROPLIST:BarFrame} = 0C66A32h

!Set ALL columns to the target color

 

The last statement above is equivalent to

?List {PROPLIST:BarFrame, 1} = 0C66A32h

and sets the listbox's default color for the entire selection bar's frame for any column where the bar frame color is not set explicitly.

If PROPSTYLE:BarFrame is set for a style where the default frame color is not set, the runtime library uses one on the base selection bar's background color.

If the bar frame color matches the selection bar color, the focus rectangle is not drawn if the list box has focus.

If a bar frame color is defined, and the listbox does not use the NOBAR attribute, and the list box has no focus, the selection bar is drawn as a frame around the current row/field using the default bar frame color. The selected background is not used to draw the current row/field under these conditions.

 

PROPLIST:Exists

An array property that returns:

- TRUE or FALSE if called with the column number > 0. If the column number specified as the array element exists, PROPLIST:Exists returns TRUE (i.e., ?List{PROPLIST:Exists,1} tests whether column 1 exists in the list). This is useful for generic list box processing.

- total number of list box columns if called with the column number 0

- total number of columns in the specified group if called for the group, for example:

?List {PROPLIST:Exists + PROPLIST:Group, ColumnNumber}

 

PROPLIST:OldTreeColor

If set to TRUE value (the default), the background color of the tree and icon area of a relational tree is set to the list box normal background color.

If set to FALSE, the background color of the tree and icon area of a relation tree is set to the background color of the row or field (depending on the FORMAT string) normal background. (as the default in Clarion 6.3 Build 9058)

 

PROPLIST:Style

PROPLIST:Style is actually more similar to PROPLIST:Group. It is a property number modifier which designates that a property is applied not to a column, but to style, e.g.:

?List {PROPLIST:TextColor, number} = SomeColor

sets the text color to cells of column number.

?List{PROPLIST:TextColor+PROPLIST:Style,N} = SomeColor

sets the text color to the style number N. If a cell or column is using the N style, the text for that cell or column will have the SomeColor color.

 

PROPLIST:TextColor

An array property that sets or returns the default text color for the text in the column number specifed as the array element. This coloring can be overridden on a per-cell basis by the standard cell coloring mechanism.

 

PROPLIST:TextSelected

An array property that sets or returns the default selected text color for the text in the column number specifed as the array element. This coloring can be overridden on a per-cell basis by the standard cell coloring mechanism.

 

Example:

WinView WINDOW('View'),AT(,,340,200),SYSTEM,CENTER

        LIST,AT(0,0,300,200),USE(?List),FROM(Que),FORMAT('80L~F1~80L~F2~80L~F3~')

       END

CODE

OPEN(WinView)

LOOP X# = 1 TO 255

 IF ?List{PROPLIST:Exists,X#} = 1       !If there is a column with this number

  ?List{PROPLIST:TextColor,X#} = COLOR:Red

  ?List{PROPLIST:BackColor,X#} = COLOR:White

  ?List{PROPLIST:TextSelected,X#} = COLOR:Yellow

  ?List{PROPLIST:BackSelected,X#} = COLOR:Blue

 ELSE

  BREAK

 END

END