Text Overflow |
Post Reply |
Author | |
choochy
Groupie Joined: 27 October 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
Posted: 17 December 2010 at 2:45am |
I have setup a Report Control with a number of columns. 3 of the columns contain text that is much larger then there is room for. A Fully Qualified Process Name is one of the example.
Currently the data overflow is handled by the ReportControl displaying the first (left) part of the text and adding ... to signify overflow. Is there a way I can control how this is done? In this case I want to start the colum with the ... and then have the right hand side of the text displayed instead. As the most meaniful data is at the end. So it will go from C:\Windows\Sys.... to ...System32\some.dll Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 13.4.2
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 & Delphi XE |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, I know this a problem and always will be... But there is hope at least in your case Add the Record items that need to be wrapped with Markup (and set wndReportControl.PaintManager.FixedRowHeight = False):
With .Records.Add
With .AddItem("") .Caption = "<StackPanel Margin = '10'><TextBlock Padding='30,10,0,15' TextWrapping='Wrap' FontWeight='Bold'>C:\Program Files\Codejock Software\ActiveX\XtremeSuiteProActiveXv13.4.0\Help</TextBlock></StackPanel>" End With End With Output:
|
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
You could also use the DrawText API with the DT_PATH_ELLIPSIS flag to get internal ellipsis if you don't want any wrapping.
It would be better if CJ added a PathEllipsis value for the TextTrimming attribute, then we wouldn't need the API. Put a ReportControl (ReportControl1) on a form and try this:
Output: Questions for CJ: 1) Why do I need to use the magic number 8 to subtract from the Right value for the cell width in order to prevent your end ellipsis from showing? 2) Can we get a PathEllipsis value for the TextTrimming attribute in Markup? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
choochy
Groupie Joined: 27 October 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Thanks guys for the replies!
jpbro's solution is definitly what I was after. Its strange though the magic number on my system is actually bigger for me, I needed to put in 20 and even then occasionally it is still out. Anyone know why this is, or how to calculate this value properly?
|
|
Product: Xtreme SuitePro (ActiveX) version 13.4.2
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 & Delphi XE |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Turns out that the ReportControl font was different than the Form font,
which accounts for most of the difference - however, I still have to use
a 5px magic number when the fonts are matched.
If I enclose the modified path in a XAML TextBlock tag, I get this down to a 3px magic number (still a magic number, but getting closer!). To anyone at Codejock - is this a problem with my code, or does the GetItemRect method return values too large (not accounting for some kind of internal margin). If this is a GetItemRect issue, maybe we need a GetItemRectClient method that returns the values accounting for the internal margin? Anyway, here's the updated code:
Choochy - maybe you could open a support ticket at http://support.codejock.com to get to the bottom of this issue? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |