File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes j2ME: How can i make a textfield uneditable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "j2ME: How can i make a textfield uneditable" Watch "j2ME: How can i make a textfield uneditable" New topic
Author

j2ME: How can i make a textfield uneditable

Sangeeta Vepa
Greenhorn

Joined: Sep 20, 2003
Posts: 22
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: j2ME: How can i make a textfield uneditable