TGUI.Net.win-x64 by texus

<PackageReference Include="TGUI.Net.win-x64" Version="0.8.8.17" />

 ListBox

public class ListBox : Widget
List box widget
public bool AutoScroll { get; set; }

Gets or sets whether the list box scrolls to the bottom when a new item is added

public uint ItemHeight { get; set; }

Gets or sets the height of the items in the list box

public uint MaximumItems { get; set; }

Gets or sets the maximum items inside the list box. When the maximum is 0 then the limit is disabled.

public ListBoxRenderer Renderer { get; set; }

Gets or sets the renderer, which gives access to properties that determine how the widget is displayed

public uint ScrollbarValue { get; set; }

Gets or sets the thumb position of the scrollbar

Gets the renderer, which gives access to properties that determine how the widget is displayed

Event handler for the DoubleClicked signal

Event handler for the ItemSelected signal

Event handler for the MousePressed signal

Event handler for the MouseReleased signal

public ListBox()

Default constructor

public ListBox(ListBox copy)

Copy constructor

public bool AddItem(string item, string id = "")

Adds an item to the list

public bool ChangeItem(string originalValue, string newValue)

Changes an item with name originalValue to newValue

public bool ChangeItemById(string id, string newValue)

Changes the name of an item with the given id to newValue

public bool ChangeItemByIndex(uint index, string newValue)

Changes the name of an item at the given index to newValue

public bool Contains(string item)

Returns whether the list box contains the given item

public bool ContainsId(string id)

Returns whether the list box contains an item with the given id

public void DeselectItem()

Deselects the selected item

public string GetIdByIndex(uint index)

Returns the id of the item at the given index

public int GetIndexById(string id)

Returns the index of the item with the given id

public string GetItemById(string id)

Returns the item name of the item with the given id

public string GetItemByIndex(uint index)

Returns the item name of the item at the given index

public uint GetItemCount()

Returns the amount of items in the list box

public IReadOnlyList<string> GetItemIds()

Returns a copy of the item ids in the list box

public IReadOnlyList<string> GetItems()

Returns a copy of the items in the list box

public string GetSelectedItem()

Returns the currently selected item

public string GetSelectedItemId()

Gets the id of the selected item

public int GetSelectedItemIndex()

Gets the index of the selected item

public void RemoveAllItems()

Removes all items from the list

public bool RemoveItem(string item)

Removes the item from the list with the given name

public bool RemoveItemById(string id)

Removes the item that were added with the given id

public bool RemoveItemByIndex(uint index)

Removes the item from the list box

public bool SetSelectedItem(string item)

Selects an item in the list box

public bool SetSelectedItemById(string id)

Selects an item in the list box

public bool SetSelectedItemByIndex(uint index)

Selects an item in the list box