-
FEATURED COMPONENTS
First time here? Check out the FAQ!
A listbox have many rows and user can select any row he want
when I am modifying data, how can I disable listbox, let user cannot change the current selected row
It real work ! :D
thank you so much.
like baskaraninfo wrote:
(not tested) List list = myListbox.getItems(); for (Object object : list) { // need a casting to Listitem Listitem item = (Listitem) object; item.setDisabled(true); }
best
Stephan
Can this problem be resolved ?
listbox.getItems().setXXX doesn't have setDisabled() method can call.....
I don't know what you mean... you just think ??? do you sure how to resolve this problem ??
If it didn't work, then you need to disable each and every item in the listbox manually one-by-one.
Get List.getItems() and call setDisabled(true) on each item.
I think it will solve your problem.
No, I had try this, It didn't work !
I use Listbox.setDisabled(true). But I still can select other row...
Do you really try it and can work ???
Or this is a bug ??? because I had try to Button.setDisabled(true), I really cannot press button, It work correctly as I want.
After getting the selected item, you can disable the listbox using the following method:
setDisabled(boolean disabled)
Then after finishing all your work, you can enable the listbox and set the selected item again, if you need.
Asked: 2009-10-21 23:26:25 +0800
Seen: 736 times
Last updated: Dec 02 '09