Re: [Vala] Newbie help requested for scrolling a TextView
- From: Al Thomas <astavale yahoo co uk>
- To: vala-list gnome org, Manish Jain <jude obscure yandex com>
- Subject: Re: [Vala] Newbie help requested for scrolling a TextView
- Date: Thu, 25 Jan 2018 12:21:44 +0000 (UTC)
> On Thursday, 25 January 2018, 11:37:49 GMT, Manish Jain <jude obscure yandex com> wrote: > I was filling
up the view> with text += <new line read by Disk Input Stream>. And I think Vala> removes the trailing
newline, so essentially my buffer always had> just one line!
By using += with the text property of the buffer you are re-writing the wholebuffer on each change. You
should probably be looking at one of the insertfunctions of Gtk.TextBuffer.
I doubt Vala is removing trailing newlines unless you are telling your program to, even if unintentionally!
Your Vala program is using library functions so lookcarefully at these library functions' documentation and
what they are returning.
At runtime, both textview and scale occupy 50% of the grid's> real-estate. Can I tell the grid to give 75%
coverage to the view> and 25% to the scale, or is there some way I can size the widgets> myself from
within my code?
You would want a 4 column grid and to make the width of the view3 and the width of the scale 1. A nice
example (Python):http://python-gtk-3-tutorial.readthedocs.io/en/latest/layout.html#id1
Regards,
Al
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]