Contextual menu in text area help


I have textarea when I select text and then right click for a menu. The menu is a clone of the mainmenu edit option. Everything works as expected except that if, say, I highlight then select cut from right cluck menu the action is taken but the menu stays visible until another mouse action/click is performed then it goes. What am I missing? I want it to disappear once cut is selected.

Also I note that if text is highlighted and the textarea loses focus the highlight is removed until the focus is returned. Is it possible the keep the highlight when focus is lost?

Thanks for any help

Hello Nick,

TextAreas have a HideSelection property that controls whether the selection is still visible when the control loses the focus, but this is only supported for Windows builds. There should be a way to do it on Mac using Declares.

For your first question, perhaps the best thing is if you post the code you are using in ContextualMenuAction to get the Cut item from the TextArea.

Hi Richard

Many many thanks…Your “HideSelection” property did the trick. Though I’d be interested to know more about the MAC workaround - not being a MAC user it is difficult to know how to tackle that.

As to the first question - I must have been more tired than I thought yesterday and simply forgot the Return statement (DOH!!!) which solved the issue. I noticed this when playing around with the HideSelection.

Thanks again…