How do I get rid of The Cut,Copy,Paste Menu in Derma VGUIs?

I have to get rid of this (because I need my own menu):

It’s neither defined in the used DTextEntry nor in any Derma code. Overriding VGUIOnMousePressed or GUIOnMousePressed didn’t help. Same for panel:RequestFocus() so far in the above hooks.

So nobody has a clue, where the copy&paste right-click menu is defined?
I searched every single lua file of GMod including Derma and did not find any hints concerning Copy,Paste or Cut.

It’s almost certainly defined in the engine, since, as far as I know, there are no bindings to copy, cut or paste.

Except for

There are. At least for Copy.

Is there some (hacky) workaround making the menu-popup disappear (when it forms)? I just have to get rid of it. That’s all.

this is predefined in vgui, as far as i know you can’t override this (without creating your own gui system without using vgui)

It is not VGUI, since if you do this on the console, you get a completely different menu.
It’s for sure a DermaMenu but seems to be created in the engine.

So the only solution would be some hacky code, which closes this vgui. Oh dear. I already tried RequestFocus on a different panel but it did not work. Same for a derma-hook concerning closing Derma Menus. But maybe I called it too early. I’ll try this later.

MUST you have this removed?
I mean really…

Yes he does.

The Problem with this Menu is, it allows Cut and Paste. And for my project, Copy should be the only option allowed. Also, I want to add other features to the Menu. That’s why I need it to be removed.

The DTExtEntry actually uses the C++ one so no you cant change that!

-snip- Disregard that I suck cox.

How would breaking every menu except that one help?
It’s defined in C++, which doesn’t use Lua helper functions.

[lua]for key, func in pairs( _G ) do
if ( func != Msg ) then
_G[ key ] = function(…)

Seems to work fine for me.

(User was banned for this post ("Trolling" - grea$emonkey))

Isnt it possible? i mean… i can remeber reading somewhere about onrightclick?

It may not be defined in DTextEntry, but perhaps it’s defined in whatever DTextEntry inherits from?

Edit: Err, on second thought, nevermind. It inherits from TextEntry (which is defined in the game itself)

I, too, thought this was possible.

You could try to create the text entry as well as possible. A lot of effort for such a small thing though :confused: