From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Gtkada keep textcurswithin window Date: Tue, 9 Oct 2018 14:26:54 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <5bbc73fe$0$12961$e4fe514c@news.kpn.nl> NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:54526 Date: 2018-10-09T14:26:54+02:00 List-Id: 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