• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Fitting ChoiceGroup labels onto the screen  RSS feed

Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having an issue which I believe I can only solve with a kludge... I'm wondering if anyone has developed such a kludge that they consider reliable across different J2ME implementations.

I have a ChoiceGroup as a part of a form. That ChoiceGroup has a label which is necessarily fairly long. My target phone, the Motorola i730, will only display about 16 characters horizontally in one line on the screen; furthermore, it will not line-wrap the label of a ChoiceGroup. I imagine that different MIDP implementations are similar. However, I unfortunately need the label to be arbitrarily long (I'm not talking paragraphs or anything; the label will be something like "Are you still at Location ABC?")

So my only thought is that I might append a StringItem to the form first, which contains the the text the would have been in the ChoiceGroup's label. A StringItem will typically line-wrap; plus I can set the StringItem to a smaller font (unlike the label of a ChoiceGroup). Then, I would append the ChoiceGroup, but give the ChoiceGroup no label. Thus, it would hopefully appear to the user as if the StringItem is the label for the ChoiceGroup items.

Does anyone know of any problems that different implementations might cause me if I do this? I know there's no guarantee of the layout, but is my approach reasonably reliable? Or is there some better approach that I'm missing?

Thanks in advance!
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!