Print Page | Close Window

Caption Alignment

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=17250
Printed Date: 10 May 2024 at 7:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Caption Alignment
Posted By: Albert1
Subject: Caption Alignment
Date Posted: 15 September 2010 at 9:46am
Using this code:
    With ReportControl
        .PaintManager.FixedRowHeight = False
        With .Columns.Add(0, "RRRRR" & vbNewLine & "rrrrr", 100, True)
            .HeaderAlignment = xtpAlignmentVCenter + xtpAlignmentCenter + xtpAlignmentWordBreak
        End With
        .Populate
    End With
 
I get this result:
 
 
 
The second row of the caption is not correctly aligned. To reach the correct alignment I need to use markup:
 

    With ReportControl
        .EnableMarkup = True
        With .PaintManager
            With .HeaderHeightFormula
                .Multiplier = 6
                .Constant = 0
                .Divisor = 2
            End With
            .RefreshMetrics
        End With
        With .Columns.Add(0, "", 100, True)
            .Caption = "<TextBlock TextWrapping='Wrap' TextAlignment='Center' VerticalAlignment='Center'>" & "RRRRR<LineBreak/>rrrrr" & "</TextBlock>"
        End With
        .Populate
    End With
 
By using markup I can get what I desire:
 
 
This way I need to setup in advance the headerheight (I did not find the header-markup-autosize. If the user uses different chars, what should I do?)
 
Is there a way to center align the caption WITHOUT use markup?
 
Thank you
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)




Replies:
Posted By: Aaron
Date Posted: 17 September 2010 at 5:26am
Hi Albert,
 
I agree, columnheader management is a bit messy. It's not working as should and if you want to create such columnheader like you want, it isn't possible...
 
To SuperMario: can you please look at this to?
 
Thanks a lot in advance
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



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