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

Custom Draw Problems

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: Custom Draw Problems
    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

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: 16 April 2009 at 3:43am
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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2009 at 9:50am
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

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