Scrolling with Gtk::TextView

View: New views
4 Messages — Rating Filter:   Alert me  

Scrolling with Gtk::TextView

by Hauberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
  I want to present some text in a Gtk::TextView, and then I want to
scroll to the end of the text in the view. I have tried the following

  Gtk::TextIter end = output_buffer->end ();
  Glib::RefPtr<Gtk::TextMark> end_mark = output_buffer->create_mark (end);
  output_view.scroll_to (end_mark);
  output_buffer->delete_mark (end_mark);

but nothing happens. Am I missing something? Or rather, what am I missing?

Cheers,
Søren
_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Parent Message unknown Re: Scrolling with Gtk::TextView

by smso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try not deleting the text mark.

Regards,
smso



_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: Scrolling with Gtk::TextView

by Hauberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/6/29  <smso@...>:
> Try not deleting the text mark.

Thanks, that did it. I'm quite surprised by this, though. The order of
the code is 1) scroll to the mark 2) delete the mark. If the scrolling
has been performed, why does it matter if I delete the mark?

Thanks,
Søren
_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: Scrolling with Gtk::TextView

by milosz derezynski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

COMMIT;

:P

2008/6/29 Søren Hauberg <hauberg@...>:
2008/6/29  <smso@...>:
> Try not deleting the text mark.

Thanks, that did it. I'm quite surprised by this, though. The order of
the code is 1) scroll to the mark 2) delete the mark. If the scrolling
has been performed, why does it matter if I delete the mark?

Thanks,
Søren
_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list


_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list
LightInTheBox - Buy quality products at wholesale price