Re: XForms: cursor

Steve Lamont (
Sat, 11 Oct 97 10:29:49 PDT

To subscribers of the xforms list from (Steve Lamont) :

> Is there a way to determine which forms input object the
> blue cursor is in?

You can test object focus at any time by interrogating the `focus'
member of the FL_OBJECT structure.

You can also track it with an object prehandler. For instance,


fl_set_object_prehandler( fd_try->input_1, handler );
fl_set_object_prehandler( fd_try->input_2, handler );



int handler( FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my,
int key, void *raw_event )


if ( event == FL_FOCUS )
fprintf( stderr, "Focus\n" );
else if ( event == FL_UNFOCUS )
fprintf( stderr, "Unfocus\n" );


To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: