Programmatically setting scroll position of ScrolledWindow



[Sorry accidentally hit the 'Send' Button to early
Hi
I have a Gtk::ScrolledWindow which is associated with two Gtk::Adjustments:

class test :  public Gtk::Window {
public:
   Gtk::Adjustment m_adjh;
   Gtk::Adjustment m_adjv;
   Gtk::ScrolledWindow m_scrW;

  ....
};


test::test()
:      m_adjh(50, 0, 100),
      m_adjv(50, 0, 100),
      m_scrW(m_adjh, m_adjv) {
....

}

Now i would like to set the 'scrollage' programmatically':

void test::setView(int iH, int iV) {
       m_adjh.set_value(iH);
       m_adjv.set_value(iV);
       m_scrW.set_vadjustment(m_adjh, m_adjv);

       repaintEverything();
}

But this does not seem to work.
Can anybody tell me how to do this?
Thank You
   Jody


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]