|
|
Hi, Still having problems, I write my handle function: int ERS_Tree::handle(int e){ int ret; if ( (e==FL_PUSH) && (Fl::event_button() == FL_RIGHT_MOUSE)) My_Tree_cb(this, NULL); ret Fl_Tree::handle(e); return ret; }
In my My_Tree_cb, I call: Fl_Tree_Item *item;
item = w->callback_item();
item is however not pointing to the item which I clicked.
I have missed something - but what ?
Best regards Håvard
fredag 26. februar 2021 kl. 13:46:04 UTC+1 skrev lifeatt...@gmail.com:
>Is it possible to make Fl_Tree repond (callbakc) to right-mouse-click ?
Yes. Create a class derived from Fl_Tree, add a custom handle() override, examine the FL_PUSH event, and check forFl::event_button() == FL_RIGHT_MOUSE
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/2dd58e02-ba50-4771-baa6-ff487e6b5a4fn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |