We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeViewAdv Owner-Draw

I''ve created a owner-drawn TreeViewAdv which is parented to a control on a form. The Tree and it''s parent control are correctly displayed initially, until you start to resize it''s parent control. What happens is that the tree seems to draw itself correctly but the parent control does not. I''ve determined it''s not the parent control (because it paints fine with no TreeViewAdv) and isolated the cause to 2 lines in the owner-drawn TreeViewAdv. If I comment out the following lines in the NodeBackgroundPaint event, this issue goes away: a) e.Node.Height = 24; b) e.Node.ShowPlusMinus = false; I originally tried to turn off plus minus by setting this.ShowPlusMinus on the TreeViewAdv but it has no effect (I assume it only works when TreeviewAdv is not owner drawn). If you''d like to provide an example which exhibits this error, please get in touch with me via email. It''s an urgent issue, so I''d appreciate if you could get back to me as soon as possible. Thanks, Ken

2 Replies

KC Kenneth Chow November 9, 2004 08:37 AM UTC

My email: chowk(-at-)misys.com

KC Kenneth Chow November 10, 2004 12:53 PM UTC

Answered my own question. Just needed to set appropriate values in the StyleInfo class for TreeViewAdv in InitializeComponent().

Live Chat Icon For mobile
Up arrow icon