sealed class Tinman.Engine.GUI.Components.DataItem

A simple data item for displaying lists and trees with a DataGrid.

Public / Constructors


public constructor DataItem → (3)

text opt : string = null

Initial value for Text.

image opt : IResourceHandle = null

Initial value for Image.

userData opt : object = null

Initial value for UserData.

Creates a new instance of DataItem.

Public / Methods


2 overloads

public method ItemFor1 → (1)

userData in : object

The user data object to find.

returns → DataItem

The found data item or null if none.

Finds the first data item that has the given user data object.

public method ItemFor2 → (1)

path in : DataGridPath

The path or null if none.

returns → DataItem

The found data item or null if none.

Finds the data item that is referenced by this given path.


public method PathFor → (1)

grid in : DataGrid

The data grid.

returns → DataGridPath

The data grid path or null if not found.

Returns the path to this data item in the given data grid.

Public / Attributes


public attribute Children → (get)

value : IVector<DataItem>

The list of child items.

Returns the list of child items.


public attribute HasChildren → (get)

value : bool

true if this item has at least one child, false if it has none.

Does this item has children?


public attribute Image → (get,set)

value : IResourceHandle

The image or null.

The image of this item.


public attribute Text → (get,set)

value : string

The text of null

The text of this item.


public attribute UserData → (get,set)

value : object

The user data object or null.

Optional user data object to associate with this item.