TextArea MouseDown and Contextual Menu

The Textarea has a lot of “built in” stuff. including reacting to Mouse events to move the insert point, select text etc.

What I am trying to do is create a Contextual menu for a Textarea.

I have the menu created, and it appears when I right-click… the problem is the mouseclick also moves the TextArea cursor at the same time.
This I do not want. RightClick is Menu, LeftClick is normal actions.

I Tried moving the entire menu to the MouseDown event… but it was flaky at best, sometimes reverting back to the default menu

What is the proper method to have the TA NOT move the cursor on a Right Click???

Why are you using MouseDown? Contextual menus are built with ConstructContextualMenu.
That may fix the issue you’re seeing? I haven’t tested the idea at all.

[quote=414514:@Tim Parnell]Why are you using MouseDown? Contextual menus are built with ConstructContextualMenu.
That may fix the issue you’re seeing? I haven’t tested the idea at all.[/quote]

Tim… I said “I Tried”… when what I thought was the “right” way didn’t work, I “tried” an alternative…

But upon reflection… the normal behaviour is going to be what is expected… so I’m good… Thanks

There isn’t anything in your post that suggests you tried the ConstructContextualMenu event so I wasn’t aware that you had.

2nd paragraph… what I did
3rd paragraph what I tried as an alternative

perhaps I should have included the word “then”… “I then tried”