|  | 
| percentage of completion | 
| Post Reply   | 
| Author | |
| flauzer   Senior Member     Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |  Post Options  Thanks(0)  Quote  Reply  Topic: percentage of completion Posted: 07 April 2006 at 3:15am | 
| How to represent in a particular column a percentage (in graphics)? It's possible to "draw" a simple progress bar with ownerdraw technique?.... Anyone else having this problem or have a different workaround? Thanks 
 | |
|  | |
| sserge   Moderator Group   Joined: 01 December 2004 Status: Offline Points: 1297 |  Post Options  Thanks(0)  Quote  Reply  Posted: 08 April 2006 at 2:24pm | 
| 
   Hi, You can override OnDrawCaption() method for your custom descendant of CXTPReportRecordItem and draw your progress bar or anything there... -- WBR, Serge | |
|  | |
| flauzer   Senior Member     Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |  Post Options  Thanks(0)  Quote  Reply  Posted: 10 April 2006 at 2:25am | 
| But in ActiveX version ?  Private Sub MethodOwnerDraw_Draw( parameters....) and hDC of the "cell" so I'll use GradientFill, DrawText, SolidBrush and so on....... Thanks Serge 
 | |
|  | |
| sserge   Moderator Group   Joined: 01 December 2004 Status: Offline Points: 1297 |  Post Options  Thanks(0)  Quote  Reply  Posted: 10 April 2006 at 11:15am | 
| However, the answer is that for VB you can catch a DrawItem event, which has a number of required parameters including hDC. -- WBR, Serge | |
|  | |
| flauzer   Senior Member     Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |  Post Options  Thanks(0)  Quote  Reply  Posted: 10 April 2006 at 11:40am | 
| Thanks.... Sorry about "wrong" forum, my IE reports correct forum.....M$ damn 
 | |
|  | |
| pcmaker   Groupie     Joined: 05 May 2005 Location: Venezuela Status: Offline Points: 23 |  Post Options  Thanks(0)  Quote  Reply  Posted: 11 September 2006 at 1:30pm | 
| 
   I DONT UNDERSTAND THIS. PLEASE YOU CAN POST A CODE EXAMPLE. I TRY TO DO IT IN VB6 FORM WITH 'Xtreme SuitePro ActiveX v9.80' VERSION. THANKS YOU FOR YOUR HELP. | |
|  | |
| flauzer   Senior Member     Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |  Post Options  Thanks(0)  Quote  Reply  Posted: 12 September 2006 at 2:45am | 
| 
   with  pseudo Code.... 
 This on Form_load 1) wndReportControl.SetCustomDraw xtpCustomBeforeDrawRow + xtpCustomDrawItem 2) This on Event.... Private Sub wndReportControl_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)       If Column.Caption = "<YourGraphColumn>" Then drawProgressCell item, hdc, Left, TOp, Right, Bottom End If End Sub And then you must implement drawProgressCell sub..... Flavio | |
|  | |
| pcmaker   Groupie     Joined: 05 May 2005 Location: Venezuela Status: Offline Points: 23 |  Post Options  Thanks(0)  Quote  Reply  Posted: 12 September 2006 at 2:07pm | 
| Thanks Flavio, but i canīt do it. I donīt know how implement drawProgressCell sub. I am looking for an answer in the web, but nothing. You posted 'More on OwnerDraw' in 06 May 2006 where you upload a zip file with your code, i try downloaded, but is not possible. Iīm appreciate that you helpme more, in order to you was solved the problem. Please, excuse me for my bad english. Thanks. Juan / Caracas-Venezuela. | |
|  | |
| flauzer   Senior Member     Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |  Post Options  Thanks(0)  Quote  Reply  Posted: 13 September 2006 at 3:45am | 
| 
   drawProgressCell is only a name of a sub (or function).... 
 you can use other name,.....what you want.   Draw<something>... represents how to draw something on a hdc context.  In the specific case, the hdc is related to the report control (cell)  Inside this sub(or function) you can write what you want,  for example draw a line, draw a rect and so on...... I suggest you to carefully examine every parameter in  wndReportControl_DrawItem...there you can found useful data used for drawing on a hdc (for example left, top,....)  If this is not clear, I recommend you to read some info on this subject (internet is overflowing...),  you can go here (for instance)...   http://www.bitwisemag.com/copy/vb/vb_graphics1.html | |
|  | |
| pcmaker   Groupie     Joined: 05 May 2005 Location: Venezuela Status: Offline Points: 23 |  Post Options  Thanks(0)  Quote  Reply  Posted: 13 September 2006 at 9:42am | 
| 
   THANKS FLAVIO, I DO IT. THE LINK TO 'vb_graphics!', WAS THE KEY. IN 10 LINES OF CODE, INCLUDING DECLARATIONS. AND THANKS TOO DONT GIVE ME THE ANSWER AT FIRST, BECAUSE, IT FORCE ME TO FIND MY OWN ANSWER. AND THEN IS THE TRUE HELP. IF YOU NEED ANYTHING, WRITE ME. | |
|  | |
| flauzer   Senior Member     Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |  Post Options  Thanks(0)  Quote  Reply  Posted: 14 September 2006 at 3:10am | 
|  you're welcome!!! | |
|  | |
| 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 |