Disable the TextField contextual menu

Hello. I am new with Xojo and I am still testing their controls. I have a problem with TextField. I am developing an apllication for Raspberry Pi with a touch screen. When I press onto the TextField, it appears a water drop symbols that indicates the control have a contextual menu. I don’t want to allow actions of copy, paste, select all, etc. So I want to disable the contextualmenu. I have read something about this in this forum but it doesn’t run. Could anybody help me?

RectControl.ConstructContextualMenu(Base As MenuItem, x As Integer, y As Integer) As Boolean

Or in other words; write Return False in the ConstructContextualMenu Event of the Control.

I did not test this, but i think this will help.

Thank you Sascha. I had already tested that solution but it doesn’t work.

at least on a mac, the textfield contextual menu is displayed by the system, and you can’t prevent it.
you can make the control readonly, or disable it and you will not have the copy menu.
or change the name of the edit menu text when you are inside your textfield

Or try the following in the MouseDown Event:

If IsContextualClick Then Return True End If

This has not worked for me either, but yes when just writting only Return True in MouseDown event.

The only thing that happens to me now is that sometimes the caret stops blinking.

Return True in the ConstructContextualMenu event handle for the Text Field ?

Using this instruction, contextual menu doesn’t display, but appears a water drop symbol in the touch screen which allows me to paste text from the clipboard.