Sorry. I use FLTK-2.0, not FLTK-1.3. Because I began with FLTK-2.0 and want to convert to FLTK-3.0, when that version is stable.
The solution is quite simple. I now surround the class FL_API Canvas : public Group with a DoubleBufferWindow *sub_win; and call sub_win->add(my_widget); Now my_widget is clipped at the border of 'sub_win'. All who helped me: thank you very much indeed. winfried > On 26.10.2012 04:46, w. szukalski wrote: > > Now everything works. Nearly. > > > > E.g. a ResetButtonWidget: > > [ code removed] > > > The canvas is a group that is clipped. Normal text is clipped > > correctly. But the widget is not clipped correctly: when it is > > scrolled into the visible area, it becomes visible on the grey > > border of the canvas. > > > > The border is outside the clip region of the group. > > > > And that part of the widget that was visible on the border > > remains to be visible on the border. > > Well, I don't understand your entire problem, but maybe I can > help anyway... > > > The question is now: how can I clip a widget so that only > > that part of it is visible that is visible in the clip > > region of the group ? > > void Fl_Group::clip_children (int c) > > Controls whether the group widget clips the drawing of child widgets to > its bounding box. > > See > <http://www.fltk.org/doc-1.3/classFl__Group.html#ac833b51b3a078bd20f6c9ee9494e31fd> > > > Or: [how] can I redraw the grey border of the canvas? > > Sorry, I don't understand. What is "the canvas" ? A special widget > of yours, the window's background, or ... ? > > > I suppose I must clip the widget. Is this possible? My clip test > > failed. I had the wrong pair of scissors. > > Maybe clip_children() is the right tool then. > > Albrecht > _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

