Help with TextView (jump)



I tried this code:

    Glib::RefPtr<Gtk::TextBuffer> buf = textview1->get_buffer();           

    Gtk::TextIter dumb;
    textview1->get_iter_at_location(dumb, 0,30);
    textview1->scroll_to(dumb,TRUE);

to scroll the TextView (which is inside a ScrollWindow) in order to focus the line numbered 30, but it didn't work.
Is there any other way to scroll to a specific line?

And if it's possible, I would like to scroll to the n_th line and get it selected.


Thanks a lot! I'm trying to do things myself and search for solutions, but now I got stuck.

--
Daniel Tiziani
dtiziani at gmail.com

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