Custom Draw Problems |
Post Reply |
Author | |
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
Posted: 15 April 2009 at 7:31pm |
When a ReportControl.PaintManager.FixedRowHeight = False and a record item has text with vbNewline in it, the ReportControl show multiple lines unless the SetCustomDraw method has been called with xtpCustomDrawItem (in which case a box is drawn instead of a newline and all of the text appears on one line). So:
Question #1) How do I draw split text with a vbNewline character to display multiple lines when SetCustomDraw xtpCustomDrawItem has been called? Also, when SetCustomDraw xtpCustomDrawItem has been called and I set the Item.Icon property to the index of an icon (in the DrawItem event) in my ReportControl.Icons collection, the icon doesn't get shown until I click the ReportControl. Calling Populate and Redraw methods crash the IDE (understandably). So: Question #2) How do I get RecordItems to refresh after setting properties in the DrawItem event? Demonstration here: uploads/20090415_193053_ReportControlCu.zip (click the "Custom Draw" checkbox to see the difference, and then click the ReportControl to see the icon appear in the attachments column..This only works once, so close and restart the demo to try again if you don't see what I mean after clicking the checkbox). |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Jason,
I changed your uploaded test project a bit
Question #1) I don't see why you need to remove vbNewLine?
Question #2) See changed test project and notice difference between BeforeDrawRow event en DrawItem event
|
|
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)
|
Hi Aaron, thanks a lot for the updated sample. I didn't need to remove the vbNewline (but I see my question was phrased poorly), I just needed to get the word break working. Your code does this, so thanks.
I do see the difference between BeforeDrawRow and DrawItem...so I will use BeforeDrawRow from now on since it works as required. Thanks again. |
|
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 |