How do I scroll from the program



Hi all:
Here's the deal. I have a Text widget with a vertical scroll bar
attached (works great). I use this window to log operations. I cannot
seem to force the widget to scroll down to the last (bottom) line after
adding test with "gtk_text_insert". I have tried many variations on the
following:

Thanks,
Eric

------------
   <variation 1 - causes seg fault >
gtk_range_get_adjustment(GTK_RANGE(gLOGVScrollbar))->value = 
       gtk_range_get_adjustment(GTK_RANGE(gLOGVScrollbar))->upper;
          
gtk_adjustment_value_changed
(gtk_range_get_adjustment(GTK_RANGE(gLOGVScrollbar)) );

-------------------      
   <variation 2 - causes seg fault>    
gtk_adjustment_set_value(
gtk_range_get_adjustment(GTK_RANGE(gLOGVScrollbar)),                              
GTK_ADJUSTMENT(gLOGVScrollbar)->lower );  
          
gtk_adjustment_value_changed
(gtk_range_get_adjustment(GTK_RANGE(gLOGVScrollbar)) );

-------------------      
   <variation 3 - works - but pins to top of scroll not bottom>    
gtk_adjustment_set_value(
gtk_range_get_adjustment(GTK_RANGE(gLOGVScrollbar)), 0 )
          
gtk_adjustment_value_changed
(gtk_range_get_adjustment(GTK_RANGE(gLOGVScrollbar)) );

-------------
-- 
Eric Hegstrom                          .~.
Senior Software Engineer               /V\  
Sonoran Scanners, Inc.                // \\          L I N U X
ehegstrom@sonoranscanners.com        /(   )\  >don't fear the penguin<
520-617-0072 x402                     ^^-^^
          ---------------------------------------
 HELP FEED THE HUNGRY AT NO COST TO YOU: http://www.thehungersite.com



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