Skip to content

Commit 00d195f

Browse files
authored
Merge branch 'master' into radio-buttons
2 parents 8360e7b + d682cfe commit 00d195f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
1010

1111
- `ProgressBar` control for tracking the completion of a task
1212
- `RadioButtons` control for groups of radio buttons
13+
- `Combobox::selected()` method to retrieve the currently selected index of the combobox
1314

1415
### Changed
1516

iui/src/controls/entry.rs

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

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

0 commit comments

Comments
 (0)