> imagine a Fl_Tabs instance with only one "card".
> Clicking on its tab will not result in a callback action.
> Catching the FL_PUSH event provides the position of the mouse-click but
> I don't know the click occuring within the tab or somewhere right of
> it.
> Is there a way how to get the tab giving the click-position?
> 
> That's what I mean:
>  _____
> /    x\  o
> 
> I'm interested in click "x" but not in click "o".
> 
> I found a variable named Fl_Tabs::tab_pos containing an array of tab-
> offsets but it is not accessible.

Might be possible to derive your own Fl_Tab widget and use that to add an 
access method for the tab_pos array. Or indeed, the derived tab widget might be 
made to respond by calling its callback in response to clicks even when there 
is only one tab active...


I would say that a tab with only one entry is maybe an unusual case to actually 
*need* to detect the click: Can you explain what you are trying to achieve 
here? Maybe if you can describe the objective, someone will have an idea how to 
get there.

For example, you could make your own tab-like widget out of a stack of groups, 
each with an associated button - the button callback would show its group and 
hide all the others, of course, (that's really all the Fl_Tab does anyway) but 
the button callback would still fire even if only one "tab" was active... Might 
be easy to implement (indeed ISTR the unittests example in the tests folder 
does basically that already.)




Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to