mos Posted February 9, 2018 Share Posted February 9, 2018 How can I did disable the popup menu that appear when you right mouse on a UniHTMLMemo? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 9, 2018 Share Posted February 9, 2018 Hi, One possible solution, try: UniHTMLMemo -> ClientEvents -> ExtEvents -> function afterrender: function afterrender(sender, eOpts) { sender.inputEl.el.dom.contentWindow.oncontextmenu = function(){ return false }; } Best regards, Quote Link to comment Share on other sites More sharing options...
mos Posted February 9, 2018 Author Share Posted February 9, 2018 Hi Delphi Developer, I am actually creating the UniHTMLMemo in code and tried to use that code but the popup menu still appears. FHTMLMemo := TUniHTMLMemo.Create(Self); FHTMLMemo.Parent := Self; FHTMLMemo.Left := 10; FHTMLMemo.Width := 100; FHTMLMemo.Top := 10; FHTMLMemo.Height := 100; FHTMLMemo.ClientEvents.ExtEvents.Values['afterrender'] := 'function afterrender(sender, eOpts){ ' + ' sender.inputEl.el.dom.contentWindow.oncontextmenu = function(){ ' + ' return false};}'; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 9, 2018 Share Posted February 9, 2018 Give the name to the created component FHTMLMemo.Name := .... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.