# To subscribers of the xforms list from spl@eggshell.ucsd.edu :
> I wanna place a FL_BUTTON on top of a canvas - so that the button action
> is evidently associated with the canvas.
>
> Obviously, I enconter some problems redrawing the button : the canvas
> hides it.
>
> I tried to force the button to get redrawn by calling fl_redraw_object at
> the end of the expose handler of the canvas - no succes....
The short answer is, you can't.
The Canvas is a special XForms object in that it is a plain X Window
which is drawn on top of an XForms Window.
The only thing I can suggest (and I haven't tried this so no
guarantees) is that you try creating a new Form with your button in
it, initialize it with fl_prepare_form_window(), and reparent it to
the Canvas:
FD_whatever *whatever = create_form_whatever();
Window window;
/*
* this should be relative to the origin of the Canvas.
*/
fl_set_form_position( whatever->whatever,
some_x_offset, some_y_offset );
window = fl_prepare_form_window( whatever->whatever,
FL_PLACE_POSITION,
FL_NOBORDER,
"Whatever" );
fl_winparent( window, FL_ObjWin( canvas ) );
fl_show_form_window( whatever->whatever );
Again, this is just a guess but it's worth a try.
spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Thu Jul 12 2001 - 17:10:54 EDT