Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Font Property, TextPartClass Class

Defines the font used to render the text part.

Class: TextPartClass
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public Font Font { get; set; }
Public Property Font As Font

Value

The font.

The default value is null/Nothing.

Comments

Defines the font used to render the text part.

Examples

C#

                RowHeaderClass rhd = item.RowHeader;
                rhd.AllowMergeFromUpper = BoolOptionalEnum.True;
                rhd.MergeWithLower = BoolOptionalEnum.True;
                rhd.Parts.Clear();
            }
            item = sftTree1.ItemCollection[1];
            item.RowHeader.Text = "Vertical";
            Font f = new Font("Arial", 8, FontStyle.Bold, GraphicsUnit.Point);
            item.RowHeader.TextPart.Font = f;
            item.RowHeader.TextPart.Format |= StringFormatFlags.DirectionVertical;
            item.RowHeader.Parts.Add(new ImagePartClass(img));

            // Make column widths and row header area width optimal
            sftTree1.Columns.MakeOptimal(0, false);
            sftTree1.RowHeaders.MakeOptimal(0, false);
            // Activate the horizontal scrollbar

VB.NET

        rhd.MergeWithLower = BoolOptionalEnum.True
        rhd.Parts.Clear()
        count = count - 1
        item = item.NextSibling
    Loop
    item = sftTree1.ItemCollection(1)
    item.RowHeader.Text = "Vertical"
    Dim f As Font = New Font("Arial", 8, FontStyle.Bold, GraphicsUnit.Point)
    item.RowHeader.TextPart.Font = f
    item.RowHeader.TextPart.Format = item.RowHeader.TextPart.Format Or StringFormatFlags.DirectionVertical
    item.RowHeader.Parts.Add(New ImagePartClass(img))

    ' Make column widths and row header area width optimal
    sftTree1.Columns.MakeOptimal(0, False)
    sftTree1.RowHeaders.MakeOptimal(0, False)
    ' Activate the horizontal scrollbar

See Also TextPartClass Class | Classes | SftTree/NET 2.0