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? 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, 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};}'; 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 := .... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now