# To subscribers of the xforms list from Angus Leeming <a.leeming@ic.ac.uk> :
On Thursday 03 October 2002 3:56 pm, Angus Leeming wrote:
> Sorry for the noise other the last 24 hours.
>
> This last mail is to say that I've "cured" my problems with
> tabfolders and tooltips. See attached for the workarounds.
>
> Note, however, the comments in tabfolder_prehandler. Something
> weird is happening somewhere.
Did I say last mail? Silly me.
Here's the tabfolder prehandler as good as I can get it.
Needless to say, this would not have been possible without the
sources to hand, so many, many thanks for that once again.
Even now I see how to work around the bug, I see no obvious way
of how to cure it properly since the parent form has no
knowledge of tabfolders.
Regards,
Angus
// This prehandler is used to work-around an xforms bug.
// Switching tabfolders like this updates the form->x, form->y
coords of
// the active tabfolder.
int tabfolder_prehandler(FL_OBJECT * obj, int event,
FL_Coord mousex, FL_Coord mousey, int key, void * ev)
{
if (!obj || obj->objclass != FL_TABFOLDER)
return 0;
// This is very odd:
// event == FL_LEAVE when the mouse enters the folder and
// event == FL_ENTER are it leaves!
if (event == FL_LEAVE) {
FL_FORM * const folder = fl_get_active_folder(obj);
Window window = fl_prepare_form_window(folder, 0, 0, "Folder");
if (window) {
FL_Coord w, h;
fl_get_wingeometry(window, &(folder->x), &(folder->y),
&w, &h);
}
}
return 0;
}
_________________________________________________
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 Oct 03 2002 - 13:22:41 EDT