puspita Posted June 2, 2013 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
Mortymer Posted June 2, 2013 Posted June 2, 2013 Set label caption with html code <a href="url">Link text</a> Quote
puspita Posted June 13, 2013 Author Posted June 13, 2013 Thanks for your advice, but it doesnt work for me Quote
Sherzod Posted March 27, 2019 Posted March 27, 2019 Hi, Can you explain? If I understand you correctly, you can do it in OnClick event Quote
jahlxx Posted March 28, 2019 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
Sherzod Posted March 28, 2019 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
jahlxx Posted March 28, 2019 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
Sherzod Posted March 29, 2019 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
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.