Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Multiple <Hyperlink> inside a panel...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multiple <Hyperlink> inside a panel...

 Post Reply Post Reply
Author
Message
scruzer View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2008
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote scruzer Quote  Post ReplyReply Direct Link To This Post Topic: Multiple <Hyperlink> inside a panel...
    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

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.