From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Gtkada keep textcurswithin window
Date: Tue, 9 Oct 2018 14:26:54 +0200
Date: 2018-10-09T14:26:54+02:00 [thread overview]
Message-ID: <ppi6qd$t2n$1@gioia.aioe.org> (raw)
In-Reply-To: 5bbc73fe$0$12961$e4fe514c@news.kpn.nl
On 2018-10-09 11:25, ldries46 wrote:
> I do have a correct working program which is using GTK the latest version.
> The only thing I cannot find is how in a text window keep the last line
> within the window.
What window? In GTK terms it makes no sense.
> Eveytime when the program updates the window the program upperline in
> the window is visible alse when there are to much line to be seen all
> within the window. This means that the text cursor disappears out of the
> window. I just want to automatically set the up down slider to position
> the window in a way that I can see the text cursor
When under window you assume Gtk_Text_View widget, e.g. put into
Gtk_Scrolled_Window widget, then there are various operations to make
the view scrolled to a desired position of the associated text buffer.
E.g. to an iterator:
1. Connect to the text buffer insert signal ("insert-text")
2. From the signal handler take the iterator to the end of the text
buffer (Get_End_Iter)
3. Scroll text view to that iterator (Scroll_To_Iter)
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
prev parent reply other threads:[~2018-10-09 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 9:25 Gtkada keep textcurswithin window ldries46
2018-10-09 12:26 ` Dmitry A. Kazakov [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox