• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Focusing on a Form Item

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'd like my MIDlet Form to focus on a specific Item it contains.

I have a Gauge which I increase or decrease, and each time I modify it I re-set the screen by calling a method which shows the Form.

This is the ItemStateListener and the method it invokes. I don't paste the showDevice method because it's quite long and I don't think it's needed to help me.





I don't know if this is the appropiate way to do this (I don't think so), but it's the one I've come to. Any advice is welcome

Anyway, the Gauge is suposed to be modified many times, and right now it's annoying because each time I modify it, the Form focuses on its first element. Then I have to go down to the gauge, modify it, go again down to the gauge, etc. The gauge is the fifth item shown and it has to be there, so placing it first isn't an option.

Thanks in advance, I hope I explained myself correctly.
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might have already got the solution somewhere till now and this reply may be too late for you..

But if you have not, try using display.setCurrentItem( item ), just after your setCurrent() call.

- Ramy..
[ October 13, 2006: Message edited by: Ramender Mall ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Maragues"

Please click on the My Profile link above and change your display name to match the JavaRanch Naming Policy of using your real first and real last names.

Thanks

Mark
 
Miguel Aragues
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Ramender!! It's not too late yet

And sorry for the inconvenience caused by my name, I wasn't aware of that policy.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic