Jump to content
  • Advertisement
Sign in to follow this  
Farzelhaar

J2ME Nokia Stringproblem ":"

This topic is 4894 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I use this code for adding Text to a form: StringItem t= new StringItem ("my text",null); t.setLayout(Item.LAYOUT_CENTER); form.append(t); Everything works fine in the sun emulator, but my nokia 6230 and the nokia emulator add a ":" at the end of the string. Does anyone know why? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
The format for StringItems on Nokia phones is:

Label:
Text

In your example "my text" is being passed on as the label of the StringItem. I think that if the label is null it won't show the ":" (it's been a while since I've used Forms), so you could try:

StringItem t= new StringItem (null,"my text");

If that doesn't work then there is not much you can do. That is the downside of using high level UI in MIDlets: you can't completely control the look and feel.

shmoove

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!