ComboBox

Choose a single item from a list of items or type a custom value.

Header#include "nativeui/combo_box.h"
Namespacenamespace nu
Typeclass (RefCounted)
InheritsComboBox

The ComboBox behaves differently from ComboBox that:

  1. no item is selected by default;
  2. duplicate items are allowed.

Constructors

ComboBox()

Create a new ComboBox view.

Class properties

const char* kClassName

The class name of this view.

Methods

void SetText(const std::string& text)

Change the text in the view.

Parameters

std::string GetText() const

Return currently displayed text.

Return

std::string

Events

void on_text_change(Entry* self)

Emitted when user has changed text.

Parameters

Preventable

No.