1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:28:11 +00:00

LibGUI: ComboBox, add "set_selected_index" method

Easy way to set selected item.
This commit is contained in:
Hüseyin ASLITÜRK 2020-03-29 18:56:31 +03:00 committed by Andreas Kling
parent db692a807b
commit 7194b4823e
2 changed files with 13 additions and 1 deletions

View file

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