Jump to content

Disable UniHTMLMemo Popup Menu


mos

Recommended Posts

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...