puspita Posted June 2, 2013 Share Posted June 2, 2013 Hey guys , i want to make a TUniLabel link able so when i click the label, it go to specified URL (or download if file is .pdf) any advice would be appreciate. thanks Quote Link to comment Share on other sites More sharing options...
Mortymer Posted June 2, 2013 Share Posted June 2, 2013 Set label caption with html code <a href="url">Link text</a> Quote Link to comment Share on other sites More sharing options...
puspita Posted June 13, 2013 Author Share Posted June 13, 2013 Thanks for your advice, but it doesnt work for me Quote Link to comment Share on other sites More sharing options...
aln02 Posted June 13, 2013 Share Posted June 13, 2013 UniLabel.TextConversion must by set to txtHTML Quote Link to comment Share on other sites More sharing options...
jahlxx Posted March 27, 2019 Share Posted March 27, 2019 Hi. Can this link be a form show? Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 27, 2019 Share Posted March 27, 2019 Hi, Can you explain? If I understand you correctly, you can do it in OnClick event Quote Link to comment Share on other sites More sharing options...
jahlxx Posted March 28, 2019 Share Posted March 28, 2019 Yes, I can, but if I want to have a label like this: You can view our Terms Here1 and Your Profile Here2 Clicking "here1" must show form1, and clicking "here2" must show form2. I hope I've clarified. Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2019 Share Posted March 28, 2019 9 minutes ago, jahlxx said: but if I want to have a label like this: You can view our Terms Here1 and Your Profile Here2 Where are you generating this? How will you distinguish between these links? Quote Link to comment Share on other sites More sharing options...
jahlxx Posted March 28, 2019 Share Posted March 28, 2019 Label caption: UniLabel6.caption := 'Go To Google ' + '<a href="www.google.com" >Google</a>'; UniLabel6.caption := UniLabel6.caption + ' or Go To Yahoo ' + '<a href="www.yahoo.com" >Yahoo</a>'; Id like, that links to be foirmx.show, instead of url links. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 29, 2019 Share Posted March 29, 2019 17 hours ago, jahlxx said: UniLabel6.caption := 'Go To Google ' + '<a href="www.google.com" >Google</a>'; UniLabel6.caption := 'Go To Google ' + '<a href="#" onclick="window.ajaxRequest('+ UniLabel6.JSName +', ''ahrefclick'', [''val=1''])">Google</a>'; procedure TMainForm.UniLabel6AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName='ahrefclick' then ShowMessage(Params.Values['val']); end; Quote Link to comment Share on other sites More sharing options...
jahlxx Posted March 29, 2019 Share Posted March 29, 2019 Ok. Thanks Quote Link to comment Share on other sites More sharing options...
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.