| ReportItemButton Alignment Property
 
 Printed From: Codejock Forums
 Category:  Codejock Products
 Forum Name:  Report Control
 Forum Description:  Topics Related to Codejock Report Control
 URL: http://forum.codejock.com/forum_posts.asp?TID=22512
 Printed Date: 30 October 2025 at 2:49pm
 Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
 
 
 Topic: ReportItemButton Alignment Property
 Posted By: magicorange
 Subject: ReportItemButton Alignment Property
 Date 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?
 |  
 
 Replies:
 Posted By: olebed
 Date 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
 
 |  
 
 |