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 | |
|---|---|
BinaryTreeListViewCellInfo | Converts a string to cell info with that text and no image. |
| Properties | |
Image | Gets or sets the image drawn beside the node's text. |
ShowImage | Gets or sets whether the node shows its image. |
Text | Gets or sets the text the info stands for. |
| Methods | |
ToString | Returns 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.
nullgives an empty text.
Returns
Properties
Image
public Image Image
Gets or sets the image drawn beside the node's text.
- Value
nullby default, for the control'sBinaryTreeListView.NodeImage, if any.
ShowImage
public bool ShowImage
Gets or sets whether the node shows its image.
- Value
trueby 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.