Vixen
02b45cc4
csharp
public sealed class ComboBox

A field that can be typed into as well as chosen from.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ The difference from Select is not the dropdown — it is that the value need not be one of the options. A combo box is a text field with suggestions; a select is a choice among a fixed set. Conflating them gives either a select that accepts nonsense or a combo box that discards what was typed.

Fields and properties (7)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public TextBox Editor

    The editable half.

  • public IconButton Toggle

    The button that drops the list.

  • public Popover List

    The floating list.

  • public IReadOnlyList<Option> Options

    The suggestions, in order.

  • public string? Value

    What is in the field.

Events (1)

  • public Action<ComboBox, string?>? ValueChanged

    Raised when the text changes, whether it was typed or chosen.

Methods (3)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • protected override void OnRemoved()
  • public Option AddOption(string value, string? label = null)

    Adds a suggestion.

Used by (1)

  • SelectionTestsVixen.Ui.Controls.Tests