Re: TreeView text nodes wordwrap

From: fuul (fuul_at_discussions.microsoft.com)
Date: 11/24/04


Date: Wed, 24 Nov 2004 00:45:05 -0800

Thank you, that is a great reference.

I was hoping that each Node would have its own Paint method that I could
override (each one called by the main Paint routine in sequence) so that I
could just alter each Node's "top" property before it was drawn,
re-positioning it below the space taken by the wrapped nodes above it.

However, it looks like the TreeView just has one Paint method and if I
override it I will have to completely redraw the whole treeview myself... (am
I right about that?) That would be fine if I had the original code and I
could just tweak it, (I don't suppose Microsoft has released the code for
it...) Anyone have code lying around for rendering a hierarchical TreeView?

"RBischoff" wrote:

> Hello fuul,
> Yes it is possible. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/custcntrlsamp4.asp
>
> Best of luck!
>
> Your C# ally ,
> RBischoff
>
>
> f> I am looking for a way to make the TreeView's nodes wrap instead of
> f> forcing horizontal scrolling (or find a custom TreeView control that
> f> someone else has already tweaked.)
> f>
> f> If no one knows where I can find such a version, do you think it is
> f> worth a try at overloading the class and customizing the way the
> f> nodes are drawn? Is that even possible? If so, could someone give me
> f> a link to an example of someone customizing the way a control is
> f> drawn?
> f>
> f> Thank you all very much...
> f>
> f> fuul
> f> treeviewquestion@smithlings.com
>
>



Relevant Pages

  • Re: Simple Problem
    ... Andrew Thompson wrote: ... >>The problem that I am having is when I add the paint method, ... > you override paintComponent() instead. ... Surely you want your applet to be setting the status ...
    (comp.lang.java.help)
  • Re: Text in a scroll bar
    ... Yes, inherit the scrollbar component, override the paint method, and make ... inherit the normal checkbox and totally replace (override) its paint method. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: TreeView - OnPaint override? - Boolean to display certain nodes
    ... you won't have to override the paint method. ... >It appears that i may need to create a custom treeview. ... >nodes and check some display boolean before making the node visible to ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Dynamically formatting a row in a Data Grid
    ... you have to do your own DataGridTextBoxColumn and override the Paint Method. ... Prev by Date: ...
    (microsoft.public.dotnet.general)
  • Re: Overriding Methods
    ... I want to override the paint method of a Windows.Forms.Panel. ... I have to manually type the override paint method? ... IIRC, you can just hit Ctrl-Space when in the derived type but outside ...
    (microsoft.public.dotnet.languages.csharp)