SftBox/OCX 4.5

SftBoxItems.Lines Property

Softel vdm, Inc.

Defines the maximum number of text lines for all items.

Syntax       

Get

VB.NET

Count = object.Lines  As Short

VB

Count = object.Lines  As Integer

C#.NET

short Count = object.Lines;

VC++

short Count = object->Lines;
short Count = object->GetLines();

C

HRESULT object->get_Lines(short* Count);

Delphi

Count := object.Lines   : Smallint;

Put

VB.NET

object.Lines = Count  As Short

VB

object.Lines = Count  As Integer

C#.NET

short object.Lines = Count;

VC++

short object->Lines = Count;
void object->PutLines(short Count);

C

HRESULT object->put_Lines(short Count);

Delphi

object.Lines := Count   : Smallint;

object

A SftBoxItems object.

Count

Defines the maximum number of text lines for all items.

Comments

The Lines property defines the maximum number of text lines for all items.

If fixed height items are used (see Items.Style), all items in the control have the same height. The best height for items is automatically calculated based on the font, graphics and text components used. If multi-line text entries are desired, the Lines property should be used to set the expected (maximum) number of lines per item. This insures that multiple lines of text will fit within the vertical space allocated to each item. Some properties which override default properties are not taken into consideration when calculating the item height. E.g., the Cell.Font property does not affect the item height. It must be chosen to be smaller or equal to the size of the control's Font property, otherwise text may be clipped vertically.

If variable height items are used (see Items.Style), items in the control can have varying heights. The best height for each item is automatically calculated based on the font, graphics and text components used. If multi-line text entries are desired, Lines property should be used to set the maximum number of lines to be displayed. This insures that multiple lines of text will fit within the vertical space allocated to each item. If a cell has more text lines than defined using the Lines property, the lines are not visible. All properties of an item, including cell properties such as the Cell.Font and Cell.Image properties, also affect the item height.

In order to enable multi-line text for a particular column, the Column.CellMultiline property has to be set to True.

If fixed height items are used (see Items.Style), the control defaults to one text line. If the Column.CellMultiline property has been set to True, multi-line text is added and the text exceeds the number of lines defined using the Lines property, the text will be truncated vertically.

If variable height items are used (see Items.Style), the control defaults to one text line. If the Column.CellMultiline property has been set to True, if more text lines need to be displayed than are defined using the Lines property, only the specified number of text lines are displayed followed by ‘+’, indicating that text lines have been truncated.


Feedback / comments / error reports for this topic
© 2008 - Softel vdm, Inc. - www.softelvdm.com