Re: [gtk-list] Re: Problems with the vadj of a text widget
- From: Vlad Harchev <hvv hippo ru>
- To: gtk-list redhat com
- cc: Gary Wong <gary CS Arizona EDU>
- Subject: Re: [gtk-list] Re: Problems with the vadj of a text widget
- Date: Fri, 7 Apr 2000 11:17:45 +0500 (SAMST)
On Thu, 6 Apr 2000, Guy Barrand wrote:
>
>
> On Thu, 6 Apr 2000, Gary Wong wrote:
>
> > Jeff Shipman writes:
> > >I'm using the following code to insert text and try to keep my
> > >adjustment bar all the way at the bottom, but unfortunately it doesn't
> > >quite hit the bottom.
> > >
> > > gtk_text_freeze(GTK_TEXT(log));
> > > gtk_text_insert(GTK_TEXT(log), NULL, &color, NULL, message, -1);
> > > gtk_text_set_point(GTK_TEXT(log),
> > >gtk_text_get_length(GTK_TEXT(log)));
> > > gtk_adjustment_set_value(GTK_TEXT(log)->vadj,
> > >GTK_TEXT(log)->vadj->upper);
> > > gtk_text_thaw(GTK_TEXT(log));
> >
> > I suspect that what's happening is that the adjustment isn't updated
> > until the text widget is thawed, so you're really moving vadj to the
> > _old_ end, not the _new_ end (make sense)? You should be able to fix
> > that by swapping the order of the gtk_adjustment_set_value() and the
> > gtk_text_thaw().
> >
>
> I have the same problem to solve.
>
> The upper solution crashes on Windows(NT).
>
> It is the usage of the gtk_adjustmnt_set_value,
> positionned before or after the thaw, that involves
> the crash.
>
> Then at least two of us are asking for a solution...
One of the solutions would be moving to GtkCList with a single column and
hidden column title (or even GtkList). If theme is configured properly, then
it will look much like GtkText, except that user won't be able to cut text
from the widget.
Just crazy idea.
> Guy Barrand
>
> -------------------------------------------------------------
> Guy Barrand e-mail: barrand@lal.in2p3.fr
> LAL Tel: +33 (1) 64 46 84 17
> Universite de Paris-Sud Fax: +33 (1) 69 07 94 04
> B.P 34
> 91898 ORSAY CEDEX France
> CERN Tel: 41 22 76 78696 (B02-R013)
> -------------------------------------------------------------
>
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]