Skip to main content

Dropdown Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Select one item from a list. ValueChanged fires when the selection changes.

public class Dropdown : Widget

Constructors​

public Dropdown(Widget parent)

Create a dropdown inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Properties​

Selected​

public int Selected { get; set; }

0-based index of the currently selected item.

Returns int

Methods​

SetOptions(IEnumerable<string> options)​

public void SetOptions(IEnumerable<string> options)

Set the items. Internally joined with newline before passing to libendpoint.

Events​

ValueChanged​

public event EventHandler ValueChanged

Fires when the user picks a different item. Runs on the UI thread.