Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

CellFont Property, SftTree Object

Defines the font used to display an item's cell text.

Deprecated - Provided for compatibility with earlier versions only - Use Cell.Font instead

Syntax

Get

VB.NETrefFontObj = object.get_CellFont(ByVal ItemIndex As Integer, ByVal ColIndex As Short) As System.Drawing.Font
VBSet refFontObj = object.CellFont(ByVal ItemIndex As Long, ByVal ColIndex As Integer) As IFontDisp
C#.NETSystem.Drawing.Font refFontObj = object.get_CellFont(int ItemIndex, short ColIndex);
VC++IFontDisp* refFontObj = object->GetCellFont(long ItemIndex, short ColIndex);
CHRESULT object->get_CellFont(long ItemIndex, short ColIndex, IFontDisp** refFontObj);

Put

VB.NETobject.let_CellFont(ByVal ItemIndex As Integer, ByVal ColIndex As Short, ByVal refFontObj As System.Drawing.Font)
VBobject.CellFont(ByVal ItemIndex As Long, ByVal ColIndex As Integer) = refFontObj As IFontDisp
C#.NETvoid object.let_CellFont(int ItemIndex, short ColIndex, System.Drawing.Font refFontObj);
VC++void object->PutCellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);
CHRESULT object->put_CellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);

PutRef

VB.NETobject.set_CellFont(ByVal ItemIndex As Integer, ByVal ColIndex As Short, ByVal refFontObj As System.Drawing.Font)
VBSet object.CellFont(ByVal ItemIndex As Long, ByVal ColIndex As Integer) = refFontObj As IFontDisp
C#.NETvoid object.set_CellFont(int ItemIndex, short ColIndex, System.Drawing.Font refFontObj);
VC++void object->PutRefCellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);
CHRESULT object->putref_CellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);

object

A SftTree object.

ItemIndex

The zero-based item index. The combination of ItemIndex and ColIndex describes an individual cell.

ColIndex

The zero-based column number. The combination of ItemIndex and ColIndex describes an individual cell.

refFontObj

Defines the font used to display an item's cell text. For information about font properties, please visit the applicable section "Using SftTree/OCX with ...".

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Cell.Font instead

The CellFont property defines the font used to display an item's cell text.

The CellFont property overrides the control's Font property for the specified cell. If the CellFont property is not set for a particular cell, the control's Font property is used to draw the cell text instead. The CellFont property can be set to the value Nothing, which restores the tree control's default font, defined using the Font property.

When using fixed height items (see Items.Style) and the CellFont property describes a font that is larger than the control's Font property, cell text will be clipped vertically. Items do not adjust their height to the CellFont property. Cell text is centered vertically and horizontally based on the Cell.TextVAlign and Cell.TextHAlign properties.

Using PutRef (see Syntax above) the control will use the reference to the Font object. If the Font object is later changed, this will also affect the font used by the control. Using Put instead causes the control to create a copy of the Font object. If the Font object is later changed, this will not affect the font used by the control as it uses a copy of the object. Because of the additional overhead and the increased resource use of Put, PutRef is the preferred method.

See Also SftTree Object | Object Hierarchy


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


Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.