Jump to content

UniHTMLMemo click on hyperlink


augusto.pellis

Recommended Posts

Hi Sherzod and thanks for your reply.

I would like to show text in the memo rendered as hyperlink, so clickable by the user. But instead of a usual http link it would make the application open a form (or generically speaking, execute a procedure) rather than navigate to a real url.

Sorry for my English, am I clear now?

Augusto 

Link to comment
Share on other sites

2 minutes ago, augusto.pellis said:

I would like to show text in the memo rendered as hyperlink, so clickable by the user. But instead of a usual http link it would make the application open a form (or generically speaking, execute a procedure) rather than navigate to a real url.

Sorry for my English, am I clear now?

Hi,

I will check.

Link to comment
Share on other sites

1 hour ago, augusto.pellis said:

I would like to show text in the memo rendered as hyperlink, so clickable by the user

Maybe something like this?

  with UniHTMLMemo1 do
  begin
    Lines.Add('<a href="javascript:window.parent.ajaxRequest(window.parent.'+JSName+', ''hrefClick'', [''hrefId=hrefId1''])">test</a>');
    ReadOnly := True;
  end;

 

procedure TMainForm.UniHTMLMemo1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName = 'hrefClick' then
    ShowMessage(Params.Values['hrefId']);

end;

 

  • Like 1
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...