SftTree/OCX 7.0

SftTree.CellFont Property

Softel vdm, Inc.

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.NET

refFontObj = object.get_CellFont(ByVal ItemIndex As Integer, ByVal ColIndex As Short)  As System.Drawing.FontLanguage-specific information

VB

Set refFontObj = object.CellFont(ByVal ItemIndex As Long, ByVal ColIndex As Integer)  As IFontDisp

C#.NET

System.Drawing.FontLanguage-specific information refFontObj = object.get_CellFont(int ItemIndex, short ColIndex);

VC++

IFontDisp* refFontObj = object->GetCellFont(long ItemIndex, short ColIndex);

C

HRESULT object->get_CellFont(long ItemIndex, short ColIndex, IFontDisp** refFontObj);

Delphi

refFontObj := object.CellFont[ItemIndex : Integer; ColIndex : Smallint]  : TFont;

Put

VB.NET

object.let_CellFont(ByVal ItemIndex As Integer, ByVal ColIndex As Short, ByVal refFontObj As System.Drawing.FontLanguage-specific information)

VB

object.CellFont(ByVal ItemIndex As Long, ByVal ColIndex As Integer) = refFontObj  As IFontDisp

C#.NET

void object.let_CellFont(int ItemIndex, short ColIndex, System.Drawing.FontLanguage-specific information refFontObj);

VC++

void object->PutCellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);

C

HRESULT object->put_CellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);

Delphi

procedure object._Set_CellFont(ItemIndex : Integer, ColIndex : Smallint, refFontObj : TFont);

PutRef

VB.NET

object.set_CellFont(ByVal ItemIndex As Integer, ByVal ColIndex As Short, ByVal refFontObj As System.Drawing.FontLanguage-specific information)

VB

Set object.CellFont(ByVal ItemIndex As Long, ByVal ColIndex As Integer) = refFontObj  As IFontDisp

C#.NET

void object.set_CellFont(int ItemIndex, short ColIndex, System.Drawing.FontLanguage-specific information refFontObj);

VC++

void object->PutRefCellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);

C

HRESULT object->putref_CellFont(long ItemIndex, short ColIndex, IFontDisp* refFontObj);

Delphi

object.CellFont[ItemIndex : Integer; ColIndex : Smallint] := refFontObj  : TFont;

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


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