Returns the first TextPartClass object of the cell's parts collection.
Class: CellBaseClass
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET
public TextPartClass TextPart { get; }
Public ReadOnly Property TextPart As TextPartClassThe TextPartClass object.
Returns the first TextPartClass object of the cell's parts collection.
If an application uses only one TextPartClass and one ImagePartClass object in each cell, it can access these using the TextPart and CellBaseClass.ImagePart properties, instead of having to "remember" which object in the parts collection is the respective object. In addition, the CellBaseClass.Text and CellBaseClass.Image properties are available to access their contents directly.
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
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 scrollbarSee Also CellBaseClass Class | Classes | SftTree/NET 2.0