This is a migrated thread and some comments may be shown as answers.

Color bug when collapsing nodes

3 Answers 36 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Lars
Top achievements
Rank 1
Lars asked on 08 Oct 2007, 11:33 AM
version 2007Q2 (4.1)
I have a treeview with two main nodes.
In the first main node two of the subnodes have a different color than the rest.

On load everything looks as expected.

If I then collapse the first main node.. then suddenly some of the subnodes in the second main nodes gets colored.

If I then expand the main node again the subnodes are again colored as expected

recreation code:
            RadTreeNode Node1 = new RadTreeNode("Drinks", true);
            RadTreeNode Node2 = new RadTreeNode("Dinner", true);


            RadTreeNode Node4 = new RadTreeNode("Beer 10");
            RadTreeNode Node5 = new RadTreeNode("Cola 8");
            Node5.ForeColor = Color.Blue;
            RadTreeNode Node6 = new RadTreeNode("Cola 12");
            Node6.ForeColor = Color.Red;
            RadTreeNode Node7 = new RadTreeNode("Vodka 370");

            RadTreeNode Node8 = new RadTreeNode("buffet adult 150");
            RadTreeNode Node9 = new RadTreeNode("buffet child 100");
            RadTreeNode Node10 = new RadTreeNode("A la carte 300");
            RadTreeNode Node11 = new RadTreeNode("3-course Menu 400");

            radTreeView2.Nodes.Add(Node1);
            radTreeView2.Nodes.Add(Node2);

            Node1.Nodes.Add(Node4);
            Node1.Nodes.Add(Node5);
            Node1.Nodes.Add(Node6);
            Node1.Nodes.Add(Node7);

            Node2.Nodes.Add(Node8);
            Node2.Nodes.Add(Node9);
            Node2.Nodes.Add(Node10);
            Node2.Nodes.Add(Node11);

3 Answers, 1 is accepted

Sort by
0
Jordan
Telerik team
answered on 08 Oct 2007, 01:13 PM
Hello Lars,

This issue is fixed and will be available in the Q2 Service Pack 1 release that is due this week.

Still, thank you for your time.

All the best,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Pawz
Top achievements
Rank 1
answered on 15 Oct 2007, 06:44 AM
Oh good... I JUST ran into the same bug. Good to know it'll be fixed shortly :)


Um, I hope this gets fixed too - if you go into the designer code and add

            radTreeNode2.ForeColor = System.Drawing.Color.Red;

and then go into the property builder, and scroll the treeview up and down (make your nodes extend past the control), the colours will shift from node to node as you scroll.

With further testing, it occurs also when you run the project with a treeview that has scroll bars & colours - scrolling up and down will spread the colours all over.

0
Jordan
Telerik team
answered on 15 Oct 2007, 08:38 AM
Hi Pawz,

The ForeColor issue fixes are available in the RadControls for WinForms 2007 Q2 SP1 release.
We hope that you enjoy using RadTreeView in your projects.

Sincerely yours,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Treeview
Asked by
Lars
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Pawz
Top achievements
Rank 1
Share this question
or