right click on tabitem (was: Re: BE IDE v0.18.5 on Home Page)
- Posted by "danielmoyer" <danielmoyer at prodigy.net> Dec 04, 2003
- 519 views
Dan wrote: > >1. just for "spiffy"ness, could you make right-click on a layer tab make > >that layer the background layer (& maybe work as a toggle, so another > >right-click de-selects it as background?) ? that'd be handy. > Judith responded: <<snip>> > ..., TabItem does not receive right click. Tab Control does > but then I do not know which "tab" was clicked. <<snip>> Judith, Best I've been able to think of is: 1. the w32HMouse event can return position of a right click; 2. then there's a "TCM_HITTEST" message which can tell you which if any tab item is at a given position, such as the position of the mouse on right click, above. But I don't know how to *use* that "TCM_HITTEST" message, maybe Derek, Jordah, or someone else can help?? Jordah made a library, "llrtns.ew", which uses a similar message to change the text on a tabitem, in "Example2.exw", but I couldn't see how to modify it to use "TCM_HITTEST". If it helps, Jordah's lib is at: http://www.rapideuphoria.com/llrtns.zip Dan Moyer -- this shows x position of right click in tabitem, handily ignores all but actual tabs at top: procedure TabControl2_onMouse (integer self, integer event, sequence params) --params is ( int event, int x, int y, int shift ) if equal(params[1], RIGHT_DOWN) then setText(StatusBar8, "right down: " & sprint(params[2])) -- x position at right click else setText(StatusBar8, " ") end if