Programmatically setting scroll position of ScrolledWindow



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);


}


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