August 3rd, 1999, 03:40 PM
CTreeCtrl display problems
I am having problems with my CTreeCtrl that is displayed in a FormView. I am using the +/- buttons to allow expansion/colapse of the tree branches. It is used with a tab control and other controls, for reference. *grin*
The problem is that when I have several branches expanded to the point where I get a vertical scroll bar and a child node is selected, the control does not properly refresh when the +/- button is clicked to collapse the branch and the scrollbars go away (the area below the newly selected parent node is grey). If I have a parent node selected when it is collapsed, the display updates correctly.
Also, if I have the tooltips enabled for the control and I click and hold on the scroll bar to drag it up and down, I get grey bars on the control if the cursor crossed into the Tree client area and a tool tip temporarily displays.
I have tried to turn the control's redraw off during expansion/collapse. That clears up the grey display problem, but the scrollbar area and frame do not refresh then. I tinkered with the parent window's refresh as well, and got even closer...but now I am stumped. Close but no cigar. *grin*
Anyone have any ideas or suggestions?
(Note: my FormView is a child window in a CSplitterWnd, in case that may be a factor)
Thanks for the time.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.