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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...