Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

j2ME: How can i make a textfield uneditable

 
Sangeeta Vepa
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am writing an application in which i am using a textfield as a combo box. So as soon as the user goes to the textfield i donot want him to write anything in the textfield. I have created a list from which he would select the records. The list is ready but i am still left with making the textfield uneditable.
Could CONSTRAINT_MASK be of any use. Please pen me the syntax for the solution.
TIA
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are trying to create a ComboBox, why not just use the class that is available in the lcdui package, ChoiceGroup, instead of trying to create your own from scratch.
Use the constraint "UNEDITABLE" when you create the TextField. This will do that trick.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic