Print Page | Close Window

[SOLVED] Column Header Word Wrap

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=16289
Printed Date: 27 May 2024 at 8:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Column Header Word Wrap
Posted By: jpbro
Subject: [SOLVED] Column Header Word Wrap
Date Posted: 26 February 2010 at 12:26pm
Is there a way to get column header captions to display on more than one line if they are too wide for the column? I tried using the xtpAlignmentWordBreak flag for the Alignment, but it didn't work:


      With .Columns.Add(.Columns.Count, "Statements Issued", 100, True)
         .Alignment = xtpAlignmentVCenter + xtpAlignmentRight + xtpAlignmentWordBreak
      End With


Playing with .PaintManager.HeaderHeightFormula provided more vertical space, but the text still didn't wrap. Is this possible?


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Replies:
Posted By: jpbro
Date Posted: 26 February 2010 at 12:34pm
Looks like I can use markup to get the desired result:


      With .Columns.Add(.Columns.Count, "Statements Issued", 100, True)
         .Caption = "<TextBlock TextWrapping='Wrap' TextTrimming='CharacterEllipsis' TextAlignment='Right' VerticalAlignment='Center' Margin='2,2,2,2'>" & .Caption & "</TextBlock>"
      End With



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: SuperMario
Date Posted: 26 February 2010 at 1:02pm
Actually....

Column.HeaderAlignment = xtpAlignmentVCenter + xtpAlignmentRight + xtpAlignmentWordBreak


Posted By: Aaron
Date Posted: 26 February 2010 at 1:02pm
Hi Jason,
 
You need to set .HeaderAlignment property to xtpAlignmentWordBreak (not .Alignment )
 
 


-------------
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....


Posted By: jpbro
Date Posted: 26 February 2010 at 1:03pm
Duh ;)

Thanks guys.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 26 February 2010 at 1:06pm
Hi,
 
That's amazing, right? SuperMario replied the same time as I did. Wish we would get always that fast a reply....
 
 


-------------
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....


Posted By: jpbro
Date Posted: 26 February 2010 at 2:15pm
;) I have noticed that things have gotten a little friendlier around here again!

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: SuperMario
Date Posted: 26 February 2010 at 5:04pm
Good to hear



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