TextArea ContextMenu

I note that a standard TextArea control produces its own useful ContextualMenu when right-clicked.

Is there a way to access this menu e.g. to add further menuItems to it?


With greetings from Norman: Subclasses are your friends – Writings from the sticks

Thanks Markus (Norman) - but not quite sure how that helps. I’d like to add to the contextual menu in TextArea that looks like this when you right click inside the control.

As far as I know (and someone please correct me if I’m wrong), you cannot alter the default context menu for TextArea purely in Xojo. You’d need to rebuild what you need for yourself in the ConstructContextualMenu event.

You might be able to do it with declares, but I don’t have any information on that. Maybe @Sam_Rowlands might?

1 Like

I did briefly experiment in the past as I too wanted to add to the default menu. Failed and I didn’t even try with declares.

It probably is possible with declares, but I don’t know how to do it off the top of my head.

1 Like

Ah. No. Xojo doesn’t pass you that original contextual menu so … no you cant add to it, you have to create it completely anew.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.