Skip to content

Commit fd856d4

Browse files
committed
implement Combobox::selected()
1 parent 13fd812 commit fd856d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

iui/src/controls/entry.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ impl Combobox {
227227
}
228228
}
229229

230+
/// Returns the index of the currently selected option.
231+
pub fn selected(&self, _ctx: &UI) -> i32 {
232+
unsafe { ui_sys::uiComboboxSelected(self.uiCombobox) }
233+
}
234+
230235
pub fn set_selected(&mut self, _ctx: &UI, value: i32) {
231236
unsafe { ui_sys::uiComboboxSetSelected(self.uiCombobox, value) }
232237
}

0 commit comments

Comments
 (0)