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

Dinamic Left image on treenode

Thread ID:





19046 Sep 16,2004 02:16 PM UTC Sep 16,2004 08:18 PM UTC WinForms 1
Tags: Tools
Luis Guerra
Asked On September 16, 2004 02:16 PM UTC

I would like to be able to put an image on the left of the node based on the leaves of that node. I only see in the documentation how to put images on the left of nodes using ImageLists. If I want to put an arbitrary image, do I need to handle the on paint event?. Can you give a little idea of the even and may be a little code on this? thanks for the help luis guerra

Luis Guerra
Replied On September 16, 2004 08:18 PM UTC

set to true the OwnerDrawNodes and then handle the BeforeNodePaint event as follows. This paints the image at the left of the control, but I find it may be preferable that being next to the left of the text. private void treeCustom_BeforeNodePaint(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvPaintEventArgs e) { Rectangle clientRectangle= e.Bounds; Point TextLocation=e.TextLocation; if (TextLocation.X


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon