View previous topic :: View next topic |
Author |
Message |
andrewc
Joined: 21 Feb 2008 Posts: 9
|
Posted: Thu May 29, 2008 3:42 pm Post subject: RowEvenStyle.BackColor is ignored if set at design time |
|
|
When I set the RowEvenStyle.BackColor (or the odd style) at design time it is ignored when the form loads. When I open the form again in the designer the setting is gone. Also at run time the setting is not set.
You can see it is set in the designer code:
this.vtReport.AllowDrop = true;
this.vtReport.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.vtReport.Columns.Add(this.vtcDescription);
this.vtReport.Location = new System.Drawing.Point(186, 80);
this.vtReport.Name = "vtReport";
this.vtReport.RowEvenStyle.BackColor = System.Drawing.Color.WhiteSmoke;
this.vtReport.ShowColumnHeaders = false;
this.vtReport.ShowRootRow = false;
this.vtReport.Size = new System.Drawing.Size(701, 361);
this.vtReport.StyleTemplate = Infralution.Controls.VirtualTree.StyleTemplate.Vista;
this.vtReport.TabIndex = 17;
this.vtReport.GetChildren += new Infralution.Controls.VirtualTree.GetChildrenHandler(this.vtReport_GetChildren);
this.vtReport.GetCellData += new Infralution.Controls.VirtualTree.GetCellDataHandler(this.vtReport_GetCellData);
this.vtReport.GetRowData += new Infralution.Controls.VirtualTree.GetRowDataHandler(this.vtReport_GetRowData);
this.vtReport.GetParent += new Infralution.Controls.VirtualTree.GetParentHandler(this.vtReport_GetParent);
If I set it in my code at run time it works:
vtReport.RowEvenStyle.BackColor = System.Drawing.Color.WhiteSmoke; |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu May 29, 2008 11:23 pm Post subject: |
|
|
I've just tried this in the Simple Tree sample project and it works without any issues. I think there must be something else going on here. Can you simulate this problem by modifying any of the sample projects?
What version of Virtual Tree are you using?
What version of Visual Studio (2005, 2008) are you using?
What operating system? _________________ Infralution Support |
|
Back to top |
|
|
andrewc
Joined: 21 Feb 2008 Posts: 9
|
Posted: Fri May 30, 2008 8:29 am Post subject: |
|
|
I'm usiing VS 2008 on Win XP. I am using your source code directly on v3.9
I don't currently have time to try the sample projects I'm afraid but I'm not to worried as I can set it at run time. |
|
Back to top |
|
|
|