View previous topic :: View next topic |
Author |
Message |
gregoryagu
Joined: 12 Dec 2007 Posts: 78
|
Posted: Mon Jan 21, 2008 11:53 pm Post subject: Column Headers |
|
|
I want to set a column header to RGB(200, 223, 255).
The Column is created in Code:
Code: |
Column mainColumn = new Column();
mainColumn.Caption = "Items";
mainColumn.AutoSizePolicy = ColumnAutoSizePolicy.AutoSize;
mainColumn.Width = 200;
mainColumn.MinWidth = 200;
mainColumn.HeaderStyle.BackColor = Color.Blue;
this.tvObjects.Columns.Add(mainColumn);
|
In the properties of the Treeview, ShowColumnHeaders is set to true, and UseThemedHeaders is set to false.
However, my header still shows up the usual Grey.
Greg |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 22, 2008 6:59 am Post subject: |
|
|
The BackColor is only used if the BorderStyle is set to Flat - otherwise the standard control colors are used. _________________ Infralution Support |
|
Back to top |
|
|
WolfenSteed
Joined: 15 Feb 2006 Posts: 7 Location: San Diego
|
Posted: Tue Jul 15, 2008 3:30 pm Post subject: Column Header color |
|
|
Which BorderStyle needs to be set to Flat for the Columns HeaderStyle.BackColor to work? I tried to set the Columns BorderStyle to Flat and I also tried to set the VirtualTree's HeaderStyle.BorderStyle to Flat. It still has the default Gray. :( _________________ Walt :)
Nothing is too small to know, and nothing is too big to attempt. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jul 15, 2008 10:54 pm Post subject: |
|
|
You need to set VirtualTree.UseThemedHeaders to false AND set HeaderStyle.BorderStyle to flat. Note that if you set the VirtualTree.StyleTemplate to Vista then this will set these settings by default. _________________ Infralution Support |
|
Back to top |
|
|
|