Re: [gtk-list] Re: gtk_text problems...



On 22 Oct 1998, Thomas Mailund Jensen wrote:

> >>>>> "SS" == Scott Stone <sstone@ume.pht.co.jp> writes:
> 
>  SS> OK, I have a gtk_text widget, into which I'm loading data.
>  SS> However, no matter what I do, when it shows up it's always
>  SS> displaying the very LAST page of the contents (ie, the
>  SS> scrollbar's all the way at the bottom).  I want it to start at
>  SS> the top.  How?  gtk_text_set_point is completely ignored, it
>  SS> seems.. basically, I'm doing things in this order:
> 
> Yeah...the set_point, as far as I understand it, sets the *point* (the
> place you insert text) rather than the cursor.  You could use
> gtk_editable_set_position to do that.
> 
> 	/mailund

Actually I fixed it, as I suspected I could, by changing the order in
which things are done.  If you freeze, set the point, insert the text,
make and attach the scrollbar, show the textbox and scrollbar, and then
thaw the textbox, that has the desired effect (use 0 as the argument to
gtk_text_set_point).  Weird.  GTK is great, but the documentation could be
a bit more robust - oh well, GTK is fairly young, it'll get there soon.

--------------------------------------------------
Scott M. Stone <sstone@pht.com, sstone@turbolinux.com>
               <sstone@pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)
http://www.pht.com		http://armadillo.pht.co.jp
http://www.pht.co.jp	        http://www.turbolinux.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]