Print Page | Close Window

DrawItem

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=5613
Printed Date: 18 September 2024 at 10:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DrawItem
Posted By: cryo75
Subject: DrawItem
Date Posted: 27 November 2006 at 7:01am
Hi,
 
I've got a simple list with 5 columns and 1000 records. The 5th column should draw a double line, so I do this in the DrawItem event:
 
Private Sub rpt_DrawItem(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal hdc As stdole.OLE_HANDLE, ByVal left As Long, ByVal top As Long, ByVal right As Long, ByVal bottom As Long, DoDefault As Boolean)
    Dim TP As POINTAPI
   
    If Column.Tag = "Col5" Then
        MoveToEx hdc, 0, 0, TP
        LineTo hdc, 0, bottom
       
        MoveToEx hdc, 3, 0, TP
        LineTo hdc, 3, bottom
    End If
End Sub
 
But nothing is being drawn. Any ideas?
 
Thanks,
Ivan



Replies:
Posted By: Philip
Date Posted: 27 November 2006 at 7:20am
Hi!
 
Custom draw event is not triggered if you don't set:
rpt.SetCustomDraw xtpCustomDrawItem
 
By default the custom draw is disabled so you have to place the line above at startup.
 
To do custom drawing, DoDefault must be False.


-------------
BORG Design - Sultanescu Philip


Posted By: cryo75
Date Posted: 27 November 2006 at 7:24am
I'm doing that too!
 
It still doesn't draw!!


Posted By: Philip
Date Posted: 27 November 2006 at 8:32am

Try this:

MoveToEx hdc, left, 0, TP
LineTo hdc, left, bottom
 
MoveToEx hdc, left+3, 0, TP
LineTo hdc, left+3, bottom
 
Being the fifth column, the x (left) property must start at the left of the fifth column, not the table.


-------------
BORG Design - Sultanescu Philip


Posted By: cryo75
Date Posted: 27 November 2006 at 8:44am

argghh!!!

it works now!!




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