On Aug 8, 2007, at 4:37 PM, Stan wrote:

> Does anyone know if this is a bug or a feature?
>
>   Fl_Scroll scroll(100, 100, 100, 100);
>   std::cout << "before: " << scroll.x() << " " << scroll.y() <<  
> std::endl;
>   scroll.position(50, 50);
>   std::cout << "after: " << scroll.x() << " " << scroll.y() <<  
> std::endl;
>
> Output is
>   before: 100 100
>   after: 100 100

This is a mistake in the API that was made a long time ago and cannot  
be corrected before a version number change as w promised to keep  
source code (and currently even binary) compatibility.

the Fl_Scroll::position() function repositions the widgets *inside*  
the scroll, whereas the Fl_Group::position() function changes the  
position of the widget itself. To get around this, you can call  
Fl_Group::position directly and explicitly.

scroll.Fl_Group::position(50, 50); // should work

----
http://robowerk.com/


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to