BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-18-2009, 03:05 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 8800
PIN: N/A
Carrier: Vodafone
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default What kind of text box to choose?

Please Login to Remove!

Hi,

I'm new with the Blackberry API and I'm porting a game from J2ME to the new API. I only use a FullScreen object where I make all the drawing myself, I don't use any objects from the API. But I need something like the TextBox from J2ME where the user can write his name if he breakes the record. I tried using EditField, I read in a previous post about it, but it won't show up on the screen. Here is how I do it:

Code:
public void editNote(String text) {
    input = new EditField(inputTexts[0], text, 255, Field.EDITABLE);
    gameScreen.add(input);
    gameScreen.setFieldWithFocus(input);
    gameScreen.noMessage = true;
}
I also need some kind of event to be able to close it when the user hits an "ok", but I suppose the class already has this implemented.

I don't know if EditField is the best choice for what I need, so if there is a better option please tell me. Thank you.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.