On 28.05.2012 13:44, testalucida wrote: > seems as if widgets placed onto a Fl_Scroll don't keep their positions on > scrolling. > E.g.: the topmost widget's y-position is 30. There is a vertical scrollbar > due to another widget with y-position 300. > Pull the vertical scrollbar down and move it back to its top position. The > y-value of the topmost widget will be 0. I would expect it keeping its > original value. Am I wrong or is FLTK?
Aside from what Greg correctly replied, your problem seems to be that your widget(s) don't fill the entire area of your Fl_Scroll. Fl_Scroll always calculates the bounding box of all your widgets and adjusts the scrolling area accordingly. Hence your observation that your topmost widget doesn't keep its y-position. If you really want to maintain a border around your widgets inside the Fl_Scroll, then you can add an invisible small box widget, in your example at position (0,0). This will keep your border intact, even if you scroll down and back again. Albrecht _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk