Print Page | Close Window

Multiple <Hyperlink> inside a panel...

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=22633
Printed Date: 05 October 2024 at 5:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiple <Hyperlink> inside a panel...
Posted By: scruzer
Subject: Multiple <Hyperlink> inside a panel...
Date Posted: 16 June 2015 at 8:01pm
I would like to be able to do someting like this:

<StackPanel>
<TextBlock><Hyperlink NAMETAG="Link1">Link Text #1</Hyperlink></TextBlock>
<TextBlock><Hyperlink NAMETAG="Link2">Link Text #2</Hyperlink></TextBlock>
</StackPanel>

Where NAMETAG is an ID that can be passed with the click event.   So far, I am unable to differentiate which Hyperlink item is being clicked.

I apologize for posting this here -- I was unsure where else it might go.  :)

-pete




Replies:
Posted By: olebed
Date Posted: 17 June 2015 at 7:28am
Hello,

I can show this via our Report Sample 

C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v16.4.0\Samples\ReportControl\VB\ReportSample\frmMain.frm

my changes in frmMain.frm for handle markup hyperlink:
Public Sub Hyperlink1_Click(ByVal Sender As Object, ByVal Arg As Object)
Debug.Print "Hyperlink_1_Click"
Arg.Handled = True
End Sub

Public Sub Hyperlink2_Click(ByVal Sender As Object, ByVal Arg As Object)
Debug.Print "Hyperlink_2_Click"
Arg.Handled = True
End Sub

Private Sub Form_Load()

wndReportControl.EnableMarkup = True

wndReportControl.MarkupContext.SetMethod Me, "Hyperlink1_Click"
wndReportControl.MarkupContext.SetMethod Me, "Hyperlink2_Click"
...
End Sub

Private Sub AddRecord(...)
Dim Record As ReportRecord
Set Record = wndReportControl.Records.Add()

Dim Item As ReportRecordItem
Set Item = Record.AddItem("")
Item.Caption = "<StackPanel> " & _
"<TextBlock><Hyperlink Click='Hyperlink1_Click'>Link Text #1</Hyperlink></TextBlock>" & _
"<TextBlock><Hyperlink Click='Hyperlink2_Click'>Link Text #2</Hyperlink></TextBlock>" & _
"</StackPanel>"
...
End Sub

Regards,
 Oleksandr Lebed



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net