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

DrawItem

 Post Reply Post Reply
Author
Message
cryo75 View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote cryo75 Quote  Post ReplyReply Direct Link To This Post Topic: DrawItem
    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
Back to Top
Philip View Drop Down
Newbie
Newbie
Avatar

Joined: 25 November 2006
Location: Romania
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Philip Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cryo75 View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote cryo75 Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2006 at 7:24am
I'm doing that too!
 
It still doesn't draw!!
Back to Top
Philip View Drop Down
Newbie
Newbie
Avatar

Joined: 25 November 2006
Location: Romania
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Philip Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cryo75 View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote cryo75 Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2006 at 8:44am

argghh!!!

it works now!!

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