This is currently impossible to do by interacting with the widget, but
may happen if the selected item is removed.
list.set_visible(false);
list.set_view_all();
list.signal_item_selected.connect(sigc::mem_fun(this, &Dropdown::list_item_selected));
+ list.signal_selection_cleared.connect(sigc::mem_fun(this, &Dropdown::list_selection_cleared));
list.signal_autosize_changed.connect(sigc::mem_fun(this, &Dropdown::list_autosize_changed));
}
rebuild();
}
+void Dropdown::list_selection_cleared()
+{
+ text.set(string());
+}
+
Dropdown::Loader::Loader(Dropdown &d):
DataFile::DerivedObjectLoader<Dropdown, Widget::Loader>(d)
void list_autosize_changed();
void resize_list();
void list_item_selected(unsigned);
+ void list_selection_cleared();
};
} // namespace GLtk