Re: [gtk-list] Re: Problems with the vadj of a text widget





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...
 
    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)
-------------------------------------------------------------




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