Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

scroll bar  RSS feed

 
angelin prema
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
In my GUI, when i move the slider my scrollbars position getting changed.
when i refresh the screen, scrollbar positions are initialized to zero again.
but i like to retain it in old position.
any one help me....
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello Angelin,

I'm not sure exactly what you mean by "refresh the screen", but you can save and restore the JScrollBar positions. Add an AdjustmentEvent listener to the JScrollBar, and save the value in the event handler. When you "refresh", call the setValue method to restore the setting.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!