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 NUIPanelnPanel.Name = "nPanel" & y.ToStringnPanel.Dock = DockStyle.FillnPanel.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 LabelmyDataPage(y).Controls.Add(qLabel)qLabel.Parent = nPanelqLabel.BackColor = Color.TransparentqLabel.BringToFront()
And this worked....weird...but it works.... Thanks for your help!
Gary,
If these labels are standard .NET labels you can setup their back color to be transparent:
label1.BackColor = Color.Transparent
Thanks for the help Angel. I can get it to work, but then the labels I add dynamically at run time dont have transparent backgrounds so it didnt work quite like I wanted, no fault of you or Nevrons controls...
Thanks
Hi Gary,
I can think of 2 solutions:
1. You can drop on NUIPanel on the tab page and set its Dock property to Fill.
2. You can create your tab page class that inherits NTabPage and override OnPaintBackground method to fill itself with a gradient. Then instead of adding the NTabPage into the NTabControl.TabPages collection add instance of this new class.
Here is an implementation of this class:
Imports
Public
g.FillRectangle(brush, r)
End
Regards,
Angel.