Published properties for ActiveX Toolkit lists

A published property is a named attribute that is associated with a given ActiveX control. The following published properties are supported for the ActiveX Toolkit list control in traditional Synergy. (They are not available in Synergy .NET.) All these can be read (using AX_GET or %AX_GETINT), and most can be modified (using AX_SET). (Changing a property using AX_SET will change the object’s visual representation if necessary.)

Property names are case sensitive. Settings that specify invalid values are ignored.

Published Properties for ActiveX Toolkit Lists

Name

Type

Write?

Description

ActiveCellHighlightStyle

n

Read/
write

A value that determines whether the focus rectangle is visible. By default, the ActiveCellHighlightStyle property is set to 0, which makes the focus rectangle invisible. If you want the cell focus rectangle to be visible (whether or not the list has focus), set ActiveCellHighlightStyle to 1.

Note that Toolkit sets this property to 1 when starting L_INPUT or L_SELECT processing, and that it sets it to 0 when exiting L_INPUT or L_SELECT processing. You will need to reset it to 1 if you want the focus rectangle to remain visible after L_INPUT or L_SELECT processing.

ArrowKeyAction

n

Read/
write

A value that determines how up arrow, down arrow, and other navigation keys work. For example, when set to 0 (the default), up arrow and down arrow move highlighting up and down one row at a time. When set to 1, up arrow and down arrow move highlighting up and down one item at a time. (An item can have more than one row.) See Appendix C: Keyboard Navigation for Lists on Windows for details.

BackColor

n

Read/
write

The RGB value of the background color for all cells. See the GetCellColor Discussion for information on RGB values.

Border

n

Read/
write

A value that determines whether the border for an ActiveX Toolkit list is visible. By default, this property is set to 1, which makes the border visible. If you want the border to be invisible, set this to 0.

ColumnsPerRow

n

Read-
only

The number of columns in the list.

CurrentColumn

n

Read/
write

The horizontal column number of the currently highlighted cell.

Note that modifying CurrentColumn from a method that is called from L_INPUT can have unpredictable results. If this happens, L_INPUT both modifies and depends on the value of CurrentColumn. Also, setting RowMode won’t affect the CurrentColumn setting. But if RowMode is on, a CurrentColumn setting won’t affect the way highlighting works in a table.

DarkItemColor

n

Read/
write

The RGB value for the background color of the second alternating item. See the GetCellColor Discussion for information on RGB values.

If DarkItemColor is modified, L_RESTART must be called before the color change will take effect.

Enabled

n

Read/
write

A value that determines if the control is enabled for input. This should be set and is read as a true or false value.

Note that if Enabled is set to false (0) and the window subsequently receives focus (by calling L_SELECT, L_INPUT, etc.), a fatal error will occur.

Ext_hWnd

n

Read-
only

The window handle of the control.

Ext_Visible

n

Read/
write

A value that determines whether the control is visible. This property should be set and is read as true or false value.

Note that if Ext_Visible is set to false (0) and the window subsequently receives focus (by calling L_SELECT, L_INPUT, etc.), a fatal error will occur.

FontName

a

Read/
write

The typeface of the font for all cells.

FontSize

n

Read/
write

The point size of the font for all cells.

FooterFontName

a

Read/
write

The typeface of the font for all footers.

FooterFontSize

n

Read/
write

The point size of the font for all footers.

HeaderFontName

a

Read/
write

The typeface of the font for all headers.

HeaderFontSize

n

Read/
write

The point size of the font for all headers.

HorizontalScrollBar

n

Read/
write

A value that determines whether the horizontal scroll bar will be shown when the list is too wide to be fully visible. This should be set and is read as a true or false value.

LightItemColor

n

Read/
write

The RGB value for the background color of the first alternating item. See the GetCellColor Discussion for information on RGB values.

If LightItemColor is modified, L_RESTART must be called before the color change will take effect.

OriginColumn

n

Read/
write

The leftmost column that is currently visible.

NonGridBackColor

n

Read/
write

The RGB value for the color of the background area that is outside the bounds of data columns but inside the ActiveX control. See the GetCellColor Discussion for information on RGB values.

RowMode

n

Read/
write

A value that determines whether the list will have cell highlighting or row highlighting when used with L_SELECT. If RowMode is set to a non-zero value, an entire row is highlighted when a user selects a cell in the row. If RowMode is set to zero, just the selected cell is highlighted (which is the default).

RowMode has no effect with L_INPUT or L_INPFLD.

SelBackColor

n

Read/
write

The RGB value for the background color for cells in a selected row. This is applicable only when RowMode is set to a non-zero value. See the GetCellColor Discussion for information on RGB values.

SelForeColor

n

Read/
write

The RGB value for the text color for cells in a selected row. This is applicable only when RowMode is set to a non-zero value. See the GetCellColor Discussion for information on RGB values.

TextColor

n

Read/
write

The RGB value of the text color for all cells. See the GetCellColor Discussion for information on RGB values.

VerticalScrollBar

n

Read/
write

A value that determines if the vertical scroll bar is shown when the list is too long to be fully visible. This property should be set and read as a true or false value.

ActiveX Toolkit lists and color

Color for ActiveX Toolkit lists is applied in the following order:

1. Color specified for the cell (if selected and RowMode is set) by the SelBackColor and the SelForeColor properties
2. Color specified for the list by the BackColor and TextColor properties
3. Color specified for the list by the DarkItemColor and LightItemColor properties
4. Color specified for the field in a script file or by IB_FIELD
5. Color specified for the field by I_FLDMOD
6. Color specified for the cell by the SetCellColor method

Setting a color that is higher in the hierarchy list above will not override a color that is at a lower level. For instance, setting the BackColor property will not have any effect on cells that have had the SetCellColor method applied.

ActiveX Toolkit lists and color

Fonts for ActiveX Toolkit lists are applied in the following order:

1. Font specified for the list’s input window
2. Font specified for this list by the FontName and FontSize properties
3. Font specified for this cell by the SetCellFont method

Similar to color, setting a font that is higher in the hierarchy list above will not override a font that is at a lower level. For instance, setting the FontName property will not have any effect on cells that have had the SetCellFont method applied.

Examples

The following example sets the background color of a list to a light teal.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_set(axctrl, "BackColor", RGB_VALUE(204,255,255))

This example sets the default text color for a list to dark blue, specifies row highlighting when a cell is selected, and sets the background and text colors for selected cells to different shades of green.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_set(axctrl, "TextColor", RGB_VALUE(0,0,102))
xcall ax_set(axctrl, "RowMode", 1)
xcall ax_set(axctrl, "SelBackColor", RGB_VALUE(153, 204, 153))
xcall ax_set(axctrl, "SelForeColor", RGB_VALUE(102, 102, 0))

This example simulates the look of green-bar paper by changing colors for alternating items.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_set(axctrl, "DarkItemColor", RGB_VALUE(153,204,153))
xcall ax_set(axctrl, "LightItemColor", RGB_VALUE(227,255,227))
xcall l_restart(listid)        ;Restart required to paint the colors.

This example sets the font typeface and point size to match a Synergy font named ActiveXListFont.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall u_wndfont(D_GETFONT, "ActiveXListFont", fontname, ptsize)
xcall ax_set(axctrl, "FontName", fontname)
xcall ax_set(axctrl, "FontSize", ptsize)

This example creates a Synergy font named “HeaderFont” that matches the font used by the list.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_get(axctrl, "HeaderFontName", fontname)
xcall u_wndfont(D_SETFONT, "HeaderFont", fontname,
&     %ax_getint(axctrl, "HeaderFontSize"))

The following example changes the footer font to Times New Roman, 12 point.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_set(axctrl, "FooterFontName", "Times New Roman")
xcall ax_set(axctrl, "FooterFontSize", 12)

The following example prevents scroll bars from being displayed.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_set(axctrl, "HorizontalScrollBar", FALSE)
xcall ax_set(axctrl, "VerticalScrollBar", FALSE)

This example scrolls the list horizontally so that the third column is to the left of the visible area.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_set(axctrl, "OriginColumn", 3)