Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Paddy
|
Jan 29, 2011 - 11:04 PM
|
Hi,
I am using v3.7 of Elegant Ribbon and v3.8 of Grid.
I have a form that has an Elegant Panel on it. Within the Elegant Panel, I have a TableLayoutPanel with three rows and one column. In the first row, I have an Elegant Label and nothing in the second row, I have an unbound grid in the third row. I made the TableLayoutPanel BackColor the same color as the Panel ForeColor using the following code:
’Make the TableLayoutPanel BackColor the same color as the Panel ForeColor.
Dim ElegantControlSkin As Elegant.Ui.ControlSkin = Nothing
Dim PanelForeColor As Color = Color.Empty
If Elegant.Ui.SkinManager.TryGetSkin("Panel", ElegantControlSkin) Then PanelForeColor = ElegantControlSkin.GetPaintInformation(Elegant.Ui.ControlState.Normal).ForegroundColor
End If
tblLayoutPanel.BackColor = PanelForeColor
When I launch the form, it looks like the following. Any ideas?
dl.dropbox.com/u/5335929/screen.png
Thanks.
|
|
Technical Support
|
Jan 31, 2011 - 3:08 AM
|
It seems that you set the TableLayoutPanel background color to Color.Empty. You should inherit from TableLayoutPanel as follows: public class MyTableLayoutPanel : TableLayoutPanel
{
public MyTableLayoutPanel()
{
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
}
}
|
|
Technical Support
|
Jan 31, 2011 - 3:11 AM
|
Then you need to set the MyTableLayoutPanel.BackColor property to Color.Transparent. This should solve the problem.
|
|