XAML button in ReportControl |
Post Reply |
Author | |
Pidi
Newbie Joined: 04 March 2009 Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 06 February 2013 at 3:46pm |
I'd like to use XAML to add a button to my ReportControl.
I tried something like this:
This works fine, however, it doesn't "function" as a button. When clicked upon, it doesn't press down. Is it possible what I want? |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Yes, this is possible. First make sure that you are using the latest version of the ReportControl (15.3.1), as I believe there were bugs in earlier implementations that prevented this from working (although you are free to try with an older version, I may be mistaken).
Next you need to make call the ReportControl.MarkupContext.SetHandler method. The value you pass depends on your language. In VB6, you would call ReportControl1.MarkupContext.SetHandler Me, but other languages will be different (I can't help you if you aren't using VB6). Next, you need to include the Click event in your button XAML (something like "<Button Click='ClickButton'>ButtonTest</Button>") Next, you need to create a Public method in your handler object that will accept the button click event from the reportcontrol. In VB6 the declaration would be Public Sub ClickButton(po_Sender As Object, po_Args As Object). Other languages will be different of course. Then everything should work. Here's a VB6 sample that you can examine and possibly translate to the language of your choice:
NOTE: This sub-forum is typically used for XAML snippets - e.g. samples, ideas, experiments, etc... If you post to the ReportControl forum (ActiveX or MFC depending on your library type), you will likely see a quicker response to your questions. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |