I want to set the backcolor of the treeview control to the same grey shade as the form itself. However, I can't seem to find the exact same grey shade as the form.
Anyone have any ideas ?
Printable View
I want to set the backcolor of the treeview control to the same grey shade as the form itself. However, I can't seem to find the exact same grey shade as the form.
Anyone have any ideas ?
here you go
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object_ , ByVal e As System.EventArgs) Handles MyBase.Load Dim color_of_Form1 As Color color_of_Form1 = Me.BackColor TreeView1.BackColor = color_of_Form1 End Sub
have fun!!:)
Look at the backcolor of the form in the properties window. Then figure out what it is set for. It is probably a system color. Then just set the back color of the treeview to the same exact setting (which by default is one of the system colors).
Whats wrong with: TreeView1.BackColor = Me.BackColor?Quote:
Originally posted by pirate
here you go
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object_ , ByVal e As System.EventArgs) Handles MyBase.Load Dim color_of_Form1 As Color color_of_Form1 = Me.BackColor TreeView1.BackColor = color_of_Form1 End Sub
have fun!!:)
Also the systemColors are enumerated in as SystemColors:
TreeView1.BackColor =SystemColors.Control
nothing wrong with the code.:D . I was really wondering if there was any worng with that. Guess none.
Thanks to everyone for the help.