Re: [gtk-list] Setting scrollbar position in gtktext



> Is there any way to move the scrollbar with GtkText widget to position
> where line x would be displayed?
  I'm using this code to position "gtk_text" object to the end:

GtkAdjustment *ga=GTK_ADJUSTMENT(GTK_TEXT(w_msgs)->vadj);
gtk_adjustment_set_value(ga,MAX(0,ga->upper-ga->page_size));

  Please modify it as required. But on very long text (many lines) you may
be not be able to jump precisely on some exact line by this method.


							Lace



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