Navigation: Language Reference > 9 - Window and Report Attributes > Window and Report Attributes >====== FORMAT() Other List Box Properties ====== | |
The following properties 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:HdrSortTextColor
PROPLIST:HdrSortBackColor
PROPLIST:SortTextColor
PROPLIST:SortBackColor
These 4 properties are to define text and background colors for cells and headers of a column set as a sort column. These properties have no effect if sort column is not turned on. This can be done by setting PROPLIST:HasSortColumn property to TRUE. If it is set to TRUE, clicking on a header for any visible column triggers the modal event EVENT:HeaderPressed.
In response to this event the program can either execute CYCLE (to ignore the event), or re-sort the source of listbox data (a QUEUE usually). If CYCLE isn't called the RTL
changes the current sort column to the one which the header has been clicked. The header and cells of the current sort column are re-drawn using colors defined using the 4 properties from above.
Cells in selected rows are drawing using selection colors.
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
SEE ALSO: