Jump to content

Recommended Posts

Posted

Good morning,

I am populating an UniHTMLMemo with some html strings. I would like to, somehow, insert an hyperlink withing the strings and when user click on it, execute a procedure which i.e. calls another form in the program. Is it possible?

Thank you very much,

Augusto

Posted
16 minutes ago, augusto.pellis said:

I would like to, somehow, insert an hyperlink withing the strings

Hello,

Can you please explain in more detail?

Posted

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 

Posted
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.

Posted
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

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...