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

Caption Alignment

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

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: Caption Alignment
    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)

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
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.125 seconds.