Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

Fixed / Variable Height Items

There are two methods by which a combo box control determines the height of an item in the list. Based on the Items.Style property, a variable height or fixed height combo box is created.

Fixed Height Combo Box

In a fixed height combo box, each item has the same height. SftBox/OCX determines the best item height for all items by analyzing the default font height (Font), the number of text lines (Items.Lines), the (largest) cell picture height, 3D display mode (Items.Appearance), (largest) label picture height, (largest) item picture height, grid line style (Items.GridStyle), the row header font (RowHeaders.Font) and the (largest) row header picture height (RowHeader.Picture). If a component is not used, it is not considered to determine the best height.

Cell fonts (Cell.Font) are not considered. If a cell font is used in a fixed height combo box, the application must insure that the cell font is not larger than the default font (Font).

All item pictures must be the same height and width.

All label pictures must be the same height and width.

All cell pictures in all columns must be the same height and width.

Variable Height Combo Box

In a variable height combo box, items have varying heights. Each item's height is individually recalculated as attributes change. This places an additional performance constraint on the combo box control, so a variable height combo box should only be defined when variable height items are necessary.

SftBox/OCX determines the best item height for each item by analyzing the default font height (Font), the cell font and cell picture height for each column, the number of text lines (Items.Lines) and word wrap style for each cell (Column.CellMultiline), 3D display mode (Items.Appearance), the item's label picture height, the item's item picture height, grid line style (Items.GridStyle), the row header font (RowHeaders.Font) and the item's row header picture height (RowHeader.Picture). If a component is not used, it is not considered to determine the best height.

As items differ in height, this also affects the static portion of a drop down list combo box. The static portion is automatically resized to accommodate the entire item height. As the control is resized, the bottom, top or center of the control remains in the same position as defined using the ControlAlign property.


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.