C# Class Flood.GUI.Controls.ListBox

ListBox control.
Inheritance: Flood.GUI.Controls.ScrollControl
显示文件 Open project: FloodProject/flood Class Usage Examples

Public Methods

Method Description
AddRow ( String label ) : Flood.GUI.Controls.Layout.TableRow

Adds a new row.

AddRow ( String label, String name ) : Flood.GUI.Controls.Layout.TableRow

Adds a new row.

Clear ( ) : void

Removes all rows.

ListBox ( Control parent ) : System

Initializes a new instance of the ListBox class.

RemoveRow ( int idx ) : void

Removes the specified row by index.

SelectRow ( Control control, bool clearOthers = false ) : void

Slelects the specified row.

SelectRow ( int index, bool clearOthers = false ) : void

Selects the specified row by index.

SelectRows ( String rowText, bool clearOthers = false ) : void

Selects the specified row(s) by text.

SelectRowsByRegex ( String pattern, RegexOptions regexOptions = RegexOptions.None, bool clearOthers = false ) : void

Selects the specified row(s) by regex text search.

SetColumnWidth ( int column, int width ) : void

Sets the column width (in pixels).

SizeToContents ( ) : void
UnselectAll ( ) : void

Deselects all rows.

UnselectRow ( Flood.GUI.Controls.ListBoxRow row ) : void

Unselects the specified row.

this ( int index ) : Flood.GUI.Controls.ListBoxRow

Returns specific row of the ListBox.

Protected Methods

Method Description
OnRowSelected ( Control control ) : void

Handler for the row selection event.

Render ( Skins skin ) : void

Renders the control using specified skin.

Private Methods

Method Description
TableResized ( Control control ) : void

Method Details

AddRow() public method

Adds a new row.
public AddRow ( String label ) : Flood.GUI.Controls.Layout.TableRow
label String Row text.
return Flood.GUI.Controls.Layout.TableRow

AddRow() public method

Adds a new row.
public AddRow ( String label, String name ) : Flood.GUI.Controls.Layout.TableRow
label String Row text.
name String Internal control name.
return Flood.GUI.Controls.Layout.TableRow

Clear() public method

Removes all rows.
public Clear ( ) : void
return void

ListBox() public method

Initializes a new instance of the ListBox class.
public ListBox ( Control parent ) : System
parent Control Parent control.
return System

OnRowSelected() protected method

Handler for the row selection event.
protected OnRowSelected ( Control control ) : void
control Control Event source.
return void

RemoveRow() public method

Removes the specified row by index.
public RemoveRow ( int idx ) : void
idx int Row index.
return void

Render() protected method

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
return void

SelectRow() public method

Slelects the specified row.
public SelectRow ( Control control, bool clearOthers = false ) : void
control Control Row to select.
clearOthers bool Determines whether to deselect previously selected rows.
return void

SelectRow() public method

Selects the specified row by index.
public SelectRow ( int index, bool clearOthers = false ) : void
index int Row to select.
clearOthers bool Determines whether to deselect previously selected rows.
return void

SelectRows() public method

Selects the specified row(s) by text.
public SelectRows ( String rowText, bool clearOthers = false ) : void
rowText String Text to search for (exact match).
clearOthers bool Determines whether to deselect previously selected rows.
return void

SelectRowsByRegex() public method

Selects the specified row(s) by regex text search.
public SelectRowsByRegex ( String pattern, RegexOptions regexOptions = RegexOptions.None, bool clearOthers = false ) : void
pattern String Regex pattern to search for.
regexOptions RegexOptions Regex options.
clearOthers bool Determines whether to deselect previously selected rows.
return void

SetColumnWidth() public method

Sets the column width (in pixels).
public SetColumnWidth ( int column, int width ) : void
column int Column index.
width int Column width.
return void

SizeToContents() public method

public SizeToContents ( ) : void
return void

UnselectAll() public method

Deselects all rows.
public UnselectAll ( ) : void
return void

UnselectRow() public method

Unselects the specified row.
public UnselectRow ( Flood.GUI.Controls.ListBoxRow row ) : void
row Flood.GUI.Controls.ListBoxRow Row to unselect.
return void

this() public method

Returns specific row of the ListBox.
public this ( int index ) : Flood.GUI.Controls.ListBoxRow
index int Row index.
return Flood.GUI.Controls.ListBoxRow