-
September 25th, 2003, 11:33 AM
#1
Tree control grayed
Hi,
I might have posted a similar question earlier, but didn't get any answer. In my SDI application I have a tree control, which is loaded from a xml document. While loading part of the document becomes grayed, if I minimize the application and restore again, the gray portion goes away. Sometimes, when there is no gray portion in the tree control minimizing and restoring creates gray portion in the tree control, but there is no specific rule by which it happens. Was wondering why it is happening, can anybody help?
Thanks
-
September 25th, 2003, 01:49 PM
#2
I'm not sure what you mean by 'graying', I never saw that happen to a tree control (although I remeber having read about that in another post - I don't know if it was yours). I can only imagine that it is an update problem while the tree control is busy inserting data and doesn't redraw quickly enough. Please try the following:
Code:
m_treeCtrl.SetRedraw(FALSE);
// Insert your data here
m_treeCtrl.SetRedraw(TRUE);
m_treeCtrl.Invalidate(TRUE);
Note that this is not just a guess to work around your problem - it is code you should add anyway when you are adding large amounts of data to a tree control in order to significantly speed things up. But in your case, I'm optimistic that it wil also solve the graying problem.
-
September 25th, 2003, 02:14 PM
#3
As usual Mr. gstercken is the rescuer (you are definitely my favorite guru on this forum). The loading problem is solved.
Sometimes when I minimize and restore, the tree control is getting grayed, any idea on that?
Thanks a lot man!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|