On 09/27/12 10:47, Eric Sokolowsky wrote:
> I'm using FLTK 1.3.0 and have a list of widgets in a Fl_Pack. This Fl_Pack is 
> inside a Fl_Scroll. When I add a new item to the Fl_Pack I want the item to 
> be visible right away, scrolling if necessary. Is there a way to do this 
> easily, or do I have to figure out where the new item is and if offscreen 
> figure out how much to adjust the scrollbar. I tried using the latter method 
> but the screen does not update right after the item is inserted until I move 
> the cursor again, even if I put the code to update the scrollbar position at 
> the beginning of my Fl_Scroll's draw() function.

        When you add the item to the pack, position the scroller,
        then call the parent window's redraw() method, eg. 
scroll->window()->redraw();
        and see if that does it.
        
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to