Change TabControl Background to Gradient


Author
Message
Gary Smith
Gary Smith
Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)
Group: Forum Members
Posts: 39, Visits: 1
How would one go about changing the background color of the tabbed pages of a TabControl to the Gradient found on the other controls when using the NUIManagerController to define the look and feel of the application?  Buttons, panels etc appear with a Gradient but the pages of the TabControl are solid.


Reply
Gary Smith
Gary Smith
Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)
Group: Forum Members
Posts: 39, Visits: 1

Yes I tried that, but it didnt seem to make a difference. Then I read where the parent property must be set to the control its placed else it will be transparent to the form background color. so....

I'm adding labels in a loop dynamically at runtime to the NTabControl, so for each page of the NTabControl I do:

Dim nPanel As New NUIPanel
nPanel.Name =
"nPanel" & y.ToString
nPanel.Dock = DockStyle.Fill
nPanel.Parent = myDataPage(y)
myDataPage(y).Controls.Add(nPanel)
nPanel.SendToBack()

then in the inner loop that addes the labels to each page I do:

Dim
qLabel As New Label
myDataPage(y).Controls.Add(qLabel)
qLabel.Parent = nPanel
qLabel.BackColor = Color.Transparent
qLabel.BringToFront()

And this worked....weird...but it works....

Thanks for your help!


 


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search