Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - LockRedraw property
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

LockRedraw property

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


Joined: 11 May 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote PatS Quote  Post ReplyReply Direct Link To This Post Topic: LockRedraw property
    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
Back to Top
PatS View Drop Down
Groupie
Groupie


Joined: 11 May 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote PatS Quote  Post ReplyReply Direct Link To This Post Posted: 22 August 2007 at 12:19pm
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.
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2008 at 12:26pm

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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2008 at 7:43am
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?
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2008 at 2:34pm
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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2008 at 3:12am
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?
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.172 seconds.