RE: [gtk-list] GtkText bug (?)




On 13-Apr-98 Tim Wilson wrote:
> I'm trying to insert a bunch of colored text into a GtkText widget
> and I
> also want it to
> scroll down along with the horizontal scrollbar.  What happens is I
> get
> this error:
> 
> ** ERROR **: file gtktext.c: line 2780 (advance_mark_n): "n > 0"
> IOT trap/Abort (core dumped)
> 
> That error happens when I just use a bunch of gtk_text_insert()'s.
> When I use gtk_text_freeze() then insert colored text and then use
> gtk_text_thaw()
> it works perfectly.. except the text widget/scrollbar don't move
> down as
> I need.

What version of GTK are you using? There have been many fixes to the
text widget in recent versions.

Here's the code I use to move to the bottom of a non-Editable text
widget after inserting text:

  GTK_TEXT(text)->vadj->value =
                 GTK_TEXT(text)->vadj->upper -
                 GTK_TEXT(text)->vadj->page_size;
  gtk_signal_emit_by_name ( GTK_OBJECT(GTK_TEXT(text)->vadj),
                  "value_changed");
 
--
E-Mail: Tony Gale <gale@daedalus.dera.gov.uk>
He who is known as an early riser need not get up until noon.

The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.



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