Title: | Microsoft Visual Basic |
Moderator: | TAMARA::DFEDOR::fedor |
Created: | Thu May 02 1991 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2565 |
Total number of notes: | 10453 |
I am trying to create a grid control with a column that contains a picture od a bar - something like a Gantt chart. (its actually a visual representation of the work done on various support tasks during a day showing the period of time the task was worked on). I have creatd a picture box control on the form and I have set the foreground and background colours. Just for now I also have the picture box set to be visible. As I process each row in the grid, I clear the picture box and draw a rectange in it where I want it using the xxx.LINE method. I then point to the correct grid cell (yyy.row= and yy.col= statements) and copy the picture image to the grid (yyy.picture = xxx.image). The picture box looks how I want it, with the appropriate background colour and a clearly visible rectange, but only the background appears to be transferred to the grid. I have tried to copy the picture .PICTURE property and get nothing transferred as all. the .IMAGE property seems to only get the background. I have looked at the Microsoft knowledge base and found the article aboutchanging the colour of an individual cell in a grid control (Q145610). Any ideas???? Thanks Don Mackay
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2523.1 | suggestion | XSTACY::PATTISON | A rolling stone gets the worm | Mon Mar 24 1997 12:52 | 5 |
Is the AutoRedraw property set to True? | |||||
2523.2 | Works - but why? | ALICAT::MACKAY | Don Mackay | Tue Mar 25 1997 19:58 | 8 |
>> Is the AutoRedraw property set to True? No it wasn't (on the Picture control - thats what I assume you were referring to) but now it is and it works like a charm - THANKS. As a follow up question - why? | |||||
2523.3 | explanation | XSTACY::PATTISON | A rolling stone gets the worm | Wed Mar 26 1997 06:37 | 9 |
Graphics are only "persistent" (eg, will re-appear if hidden/exposed by another window) when the autoredraw property is set to true. If Autoredraw is false, then VB doesnt store the graphic in memory, it simply draws it on the screen. (You can however put code in the Paint event, but thats no use in your application) Dave |