LockRedraw property |
Post Reply |
Author | |
PatS
Groupie Joined: 11 May 2006 Status: Offline Points: 24 |
Post Options
Thanks(0)
Posted: 22 August 2007 at 12:03pm |
When I set the LockRedraw property = True prior to adding PropertyGridItem objects to the Property grid control and then set it to False afterwards, I'm seeing a crash. I'd like to use this property to try to increase the performance of my app. If I remove the lines of code that set the LockRedraw property, the code runs fine. Has anyone else seen this? Any known workarounds? I'm using v11.1.3 of the PropertyGrid control.
Thanks,
Pat
|
|
PatS
Groupie Joined: 11 May 2006 Status: Offline Points: 24 |
Post Options
Thanks(0)
|
I've found that if I call the .Categories.Clear method before setting the .LockRedraw property = False, the code does not crash.
Even with this workaround, this should still be investigated by the Codejock development team.
|
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
I have had the same problem. If i store a reference of a propertyitem for faster access and clear than the cateogrychilds, i get also a crash.I have to clear all reference to any propertyitem bevor i clear the childs !
Than i have no crash and it works fine.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
You are talking about increasing the speed of your app. Are you adding that much items to the grid?
I'm (ab)using the grid for loading filenames from directories. While loading the filenames into the grid (multiple levels), the font/colors of the items will be changed, the files will be sorted on month and year and a few minor things. I did some tests and I found when loading about 1200 items:
Without LockRedraw : between 0.65 - 0.69 sec
With LockRedraw : between 0.49 - 0.53 sec
This with a 800Mhz machine, I know yours will be faster... So why bother when you have to add less items? |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
I don't add many items, i store some references of added propertyitems in my own vars, so i don't need than Find-Methods.
I think for your application, the reportcontrol will be the better solution:
- support subrecords with +/- button like tree
- multiple columns
- also fonts and colors
- ownerdraw
The loading of 2000 records with 20 columns are done less 1 second.
Also you get more information in one control as in the propertygrid with 2 columns.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Baldur, I don't need more info or speed. This is just the control I need.
But this wasn't an issue, was it? PatS wanted to increase the app and I only wanted to give an indication how long it takes when adding 1200 items to the grid. The difference between LockRedraw = true and LockRedraw = false is about 0,2 seconds. So why bother using LockRedraw if your not adding lots of items?
|
|
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 |