HypernovaDesktop Components · docs
Binarymission
WinForms › Tree List View › BinaryTreeListViewCellInfo

BinaryTreeListViewCellInfo

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.TreeControls

The image settings of a node's tree cell – its image and whether to show it – with a text, as one object.

public class BinaryTreeListViewCellInfo

Remarks

Pass one as the tree column's value to BinaryTreeListViewNodesCollection.Add(), and the node shows the info's Text and Image; or assign one to BinaryTreeListViewNode.BinaryTreeListViewCellInfo. A string can be cast to one.

Examples

// Columns: Mailbox (the tree column), Unread.
BinaryTreeListViewCellInfo inbox = new BinaryTreeListViewCellInfo
{
    Text = "Inbox",
    Image = Properties.Resources.Inbox16,
    ShowImage = true
};
mail.Nodes.Add(inbox, 12);

Members at a glance

Constructors
BinaryTreeListViewCellInfoConverts a string to cell info with that text and no image.
Properties
ImageGets or sets the image drawn beside the node's text.
ShowImageGets or sets whether the node shows its image.
TextGets or sets the text the info stands for.
Methods
ToStringReturns Text.

Constructors

BinaryTreeListViewCellInfo static

public static explicit operator BinaryTreeListViewCellInfo(string value)

Converts a string to cell info with that text and no image.

Parameters
value
The text. null gives an empty text.
Returns

New cell info whose Text is value and whose ShowImage is true.

Properties

Image

public Image Image

Gets or sets the image drawn beside the node's text.

Value
null by default, for the control's BinaryTreeListView.NodeImage, if any.

ShowImage

public bool ShowImage

Gets or sets whether the node shows its image.

Value
true by default.

Text

public string Text

Gets or sets the text the info stands for.

Value
An empty string by default.
Remarks

When the info is the tree cell's value, this is the text shown, since the cell shows the value's ToString. Assigned to BinaryTreeListViewNode.BinaryTreeListViewCellInfo, it does not change the cell's text.

Methods

ToString

public override string ToString()

Returns Text.

Returns

The info's text.