i'm using lwuit with j2me . how to get combo box selected item or index? i found the function for setSelectedIndex but not for getting the selected.
Getting the selected value Value of the selected item can be retrieved by using the SelectedValue property. It returns the property value bind to the ValueMember property. If the ValueMember is not initialized, it will return the value of the property bind to DisplayMember.
You can display the selected value from combobox to textbox by using the SelectedValuePath and SelectedValue property of WPF ComboBoxAdv control.
To remove an itemCall the Remove or RemoveAt method to delete items. Remove has one argument that specifies the item to remove. RemoveAt removes the item with the specified index number.
Use this code :
combobox.getSelectedIndex();
To return the current selected offset in the list.
combobox.getSelectedItem();
To return the current selected item in the list or null for no selection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With