Combining a TextField and CheckBox in a List

55 views
Skip to first unread message

timo.v...@gmail.com

unread,
Dec 12, 2013, 10:09:16 AM12/12/13
to codenameone...@googlegroups.com
I have created a List with a DefaultListModel and a Container as its renderer.
In this rendering Container there are a TextField and a CheckBox.
Both are filled with values from the DefaultListModel.

I would expect to be able to both edit the TextFields and toggle the checkboxes.
But when I tap on the TextField, the CheckBox is switched on/off and there is no response from the TextField.

How can I combine TextFields and CheckBoxes in a List?

timo.v...@gmail.com

unread,
Dec 12, 2013, 10:27:56 AM12/12/13
to codenameone...@googlegroups.com, timo.v...@gmail.com
Update:

When removing the CheckBox, the TextFields are still not editable.

Is it at all possible to place editable fields in a List?

Chen Fishbein

unread,
Dec 12, 2013, 10:38:12 AM12/12/13
to codenameone...@googlegroups.com, timo.v...@gmail.com
no, The List renderer is stateless.
Use a Container with boxlayout y instead.

timo.v...@gmail.com

unread,
Dec 12, 2013, 10:41:48 AM12/12/13
to codenameone...@googlegroups.com, timo.v...@gmail.com
This means I am left without the convenience of the list model, but at least that approach will work.

Thank you for the quick response!  :-)
Reply all
Reply to author
Forward
0 new messages