* Gtkada keep textcurswithin window
@ 2018-10-09 9:25 ldries46
2018-10-09 12:26 ` Dmitry A. Kazakov
0 siblings, 1 reply; 2+ messages in thread
From: ldries46 @ 2018-10-09 9:25 UTC (permalink / raw)
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.
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
I am using Gtk+3.
Bertus Dries
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Gtkada keep textcurswithin window
2018-10-09 9:25 Gtkada keep textcurswithin window ldries46
@ 2018-10-09 12:26 ` Dmitry A. Kazakov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry A. Kazakov @ 2018-10-09 12:26 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-09 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 9:25 Gtkada keep textcurswithin window ldries46
2018-10-09 12:26 ` Dmitry A. Kazakov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox