augusto.pellis Posted March 4, 2020 Posted March 4, 2020 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 Quote
Sherzod Posted March 4, 2020 Posted March 4, 2020 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? Quote
augusto.pellis Posted March 5, 2020 Author Posted March 5, 2020 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 Quote
Sherzod Posted March 5, 2020 Posted March 5, 2020 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. Quote
Sherzod Posted March 5, 2020 Posted March 5, 2020 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; 1 Quote
augusto.pellis Posted March 5, 2020 Author Posted March 5, 2020 That's exactly what I wanted. My respect. UniGUI keeps pleasantly surprising me every day. This program should be shipped with Delphi itself, hands down. Thank you Augusto 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.