I think I have discovered a bug (please confirm, I don't know if it should be a normal behaviour).

With FLTK 1.1.10 or the last 1.3.x snapshot (7677), I can't change the position of widgets Fl_Input and Fl_Output. I found that the problem is with the redefinition of Fl_Widget::position(X,Y) in the class Fl_Input_. To reproduce the bug, run the simple file in attachment.

In the callback function, widget are casted by default to Fl_Input_ and I try to move using the position(X,Y) function.

- With Fl_Input_ cast and the position function, widgets don't move.
- If I leave the cast to Fl_Input_, I can move the widget using the resize(X,Y,W,H) function instead. Is that a normal behaviour? - If we change the cast to Fl_Widget, then they can be moved with the position function.

If we look into Fl_Widget and Fl_Input_, we can see that Fl_Widget::position(X,Y) is a shortcut to resize(X,Y,w(),h()) but in Fl_Input_, the function position(X,Y) is redefined and is more complicated.

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

Reply via email to