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.
Unfortunately, activation email could not send to your email. Please try again.

TreeViewAdv Owner-Draw

Thread ID:

Created:

Updated:

Platform:

Replies:

21388 Nov 9,2004 03:36 AM Nov 10,2004 07:53 AM Windows Forms 2
loading
Tags: Tools
Kenneth Chow
Asked On November 9, 2004 03:36 AM

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

Kenneth Chow
Replied On November 9, 2004 03:37 AM

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

Kenneth Chow
Replied On November 10, 2004 07:53 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;