Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - ReportItemButton Alignment Property
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportItemButton Alignment Property

 Post Reply Post Reply
Author
Message
magicorange View Drop Down
Newbie
Newbie


Joined: 03 September 2012
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote magicorange Quote  Post ReplyReply Direct Link To This Post Topic: ReportItemButton Alignment Property
    Posted: 15 January 2015 at 7:30am
I have placed the ReportItemButton to report control.
but the button's Alignment Property can not be set to "Center", only 3 property available(xtpReportItemControlUnknown, xtpReportItemControlLeft, xtpReportItemControlRight)

It is a bug?
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: 22 April 2015 at 11:04am
Hello,

ReportItemButton is designed to control main content/value of ReportRecodItem. I think the simplest way to get button as main content of report cell is using markup with xaml. See our 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 button:
Public Sub MButton_Click(ByVal Sender As Object, ByVal Arg As Object)
Debug.Print "MButton_Click"
Arg.Handled = True
End Sub

Private Sub Form_Load()
wndReportControl.EnableMarkup = True
wndReportControl.MarkupContext.SetMethod Me, "MButton_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 = "<Button Cursor='Hand' Click='MButton_Click'> <TextBlock HorizontalAlignment='Center'> markup button </TextBlock> </Button>"
...
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.172 seconds.