1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibGUI: Add ComboBox::selected_index()

This returns the currently selected index. It was a bit strange that
we had set_selected_index() but not a way to read it back. :^)
This commit is contained in:
Andreas Kling 2020-08-21 20:01:45 +02:00
parent 50076997f4
commit 8055813ecf
2 changed files with 6 additions and 0 deletions

View file

@ -49,6 +49,7 @@ public:
const Model* model() const;
void set_model(NonnullRefPtr<Model>);
size_t selected_index() const;
void set_selected_index(size_t index);
bool only_allow_values_from_model() const { return m_only_allow_values_from_model; }