hide a Form Item
Its possible to hide a Form Item?
example: choicegroup.visible=false or similar
Its possible to hide a Form Item?
example: choicegroup.visible=false or similar
Hi Pepetrueno
To the best of my knowledged, no, you cannot hide a form item. But you can remove it from the form and add it back later when you want to make it visible.
Check out the form methods to append / delete / delete all / set / insert..
I have made an application which uses this technique to remove irrelevant TextFields depending on selection from a ChoiceGroup. The ChoiceGroup and all fields are substituted with other items based on a CommandAction: this looks like a totally different form but is just the same old one with a different set of items.
I did this as a workaround for the j2me bug that throws NullPointerException when trying to SetConstraint on a TextField (could not make the field TextField.UNEDITABLE) and an unrelated bug in my MOTOROKR E6 (acknowledged by Motorola, no fix yet) which prevented a form from responding to ItemStateChanged after once losing the focus.
If you want to take a look at the functionality, it's available from http://www.GetJar.com/products/11268/HoleVol
regards, Darryl
many Thanks.