Re: ScrolledWindow autoscrolling
- From: Bartek Kostrzewa <bartek runbox com>
- To: gtkmm-list gnome org
- Subject: Re: ScrolledWindow autoscrolling
- Date: Tue, 11 Oct 2005 14:47:48 +0100
Reto Bürki wrote:
> Hi List,
>
> I already posted this message to the glademm-list, but did not receive
> any answers, that's why I'm re-posting it here...hope that's ok.
>
> I know this topic has been discussed a few times all over the different
> gtk related lists :) but still I can't find a suitable solution.
>
> What I have is a Gtk::TextView inside a Gtk::ScrolledWindow, the usual
> combo when you insert a TextView in glade-2. The TextView widget is used
> to display chat-text inside a chat client and should therefore scroll
> automatically as soon as the text has a certain length. what is the
> appropriate way to do this? I'm using glademm (2.6.0) with glade-2
> (2.6.8) and gtkmm (2.4.11). which signal do I have to catch and where?
> it is clear to me that I have to call the set_hadjustment and
> set_vadjustment functions of the ScrolledWindow widget...but I have
> difficulties to find the correct signal to catch...and where to catch
> the signal (child or inside the ScrolledWindow)
How about creating your own signal which fires as soon as get_height()
of your TextView exceeds get_height() of your ScrolledWindow() ? That
way you don't have to care about font sizes and line numbers.
or maybe just poll for those two manually in your entry cell... some
simple arithmetic will enable your to scroll exactly to the place you
need to scroll to
all this assuming TextView inherits from Gtk::Widget
>
> thanks for your help!
>
> reto
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]