Configures a column in a TreeGridView component.

Available since

1.0.0

.

See also:

Constructor

new(?headerText:String, ?itemToText:Dynamic ‑> String, ?width:Float)

Creates a new TreeGridViewColumn object with the given arguments.

Available since

1.0.0

.

Variables

@:value(null)cellRendererRecycler:AbstractDisplayObjectRecycler<Dynamic, TreeGridViewCellState, DisplayObject> = null

Manages cell renderers used by this grid view column.

In the following example, the column uses a custom cell renderer class:

column.cellRendererRecycler = DisplayObjectRecycler.withClass(CustomCellRenderer);
Available since

1.0.0

.

See also:

headerText:String

The text to display in the column's header.

In the following example, the column's header text is customized.

column.headerText = "Name";
Available since

1.0.0

.

@:value(0.0)minWidth:Float = 0.0

The minimum width of the column, measured in pixels.

If the width is specified explicitly, then the minWidth will be ignored.

In the following example, the column's minimum width is customized.

column.minWidth = 120.0;
Available since

1.0.0

.

@:value(null)width:Null<Float> = null

The width of the column, measured in pixels.

In the following example, the column's width is customized.

column.width = 120.0;
Available since

1.0.0

.

cellRendererRecyclerIDFunction:(state:TreeGridViewCellState) ‑> String

When a grid view column requires multiple cell renderer types, this function is used to determine which type of cell renderer is required for a specific item. Returns the ID of the cell renderer recycler to use for the item, or null if the default cellRendererRecycler should be used.

The following example provides an cellRendererRecyclerIDFunction:

var regularItemRecycler = DisplayObjectRecycler.withClass(HierarchicalItemRenderer);
var firstItemRecycler = DisplayObjectRecycler.withClass(MyCustomItemRenderer);
column.setCellRendererRecycler("regular-item", regularItemRecycler);
column.setCellRendererRecycler("first-item", firstItemRecycler);
column.cellRendererRecyclerIDFunction = function(state:TreeGridViewCellState):String {
	if(state.rowIndex == 0) {
		return "first-item";
	}
	return "regular-item";
};
Available since

1.4.0

.

See also:

Methods

getCellRendererRecycler(id:String):DisplayObjectRecycler<Dynamic, TreeGridViewCellState, DisplayObject>

Returns the item renderer recycler associated with a specific ID. Returns null if no recycler is associated with the ID.

Available since

1.4.0

.

See also:

dynamicitemToText(data:Dynamic):String

Converts an item to text to display within a grid view cell. By default, the toString() method is called to convert an item to text. This method may be replaced to provide custom text.

For example, consider the following item:

{ text: "Example Item" }

If the grid view cell should display the text "Example Item", a custom implementation of itemToText() might look like this:

column.itemToText = (item:Dynamic) -> {
	return item.text;
};
Available since

1.0.0

.

setCellRendererRecycler(id:String, recycler:AbstractDisplayObjectRecycler<Dynamic, TreeGridViewCellState, DisplayObject>):Void

Associates a cell renderer recycler with an ID to allow multiple types of cell renderers may be displayed in the grid view column. A custom cellRendererRecyclerIDFunction may be specified to return the ID of the recycler to use for a specific item in the data provider.

To clear a recycler, pass in null for the value.

Available since

1.4.0

.

See also: