Jan 13, 2015, 10:49 AM
[CLOSED] Label properties ForeColor and BackColor on codebehind
Hello while migrating I have just noticed that ForeColor and BackColor does not seem to work on codebehind.
Here is an example which shows it. In the breaking changes there is no mention about it. Is a bug or I need to set the colors in a different way?
Here is an example code, nor the background color nor the foreground color are displayed
Here is an example which shows it. In the breaking changes there is no mention about it. Is a bug or I need to set the colors in a different way?
Here is an example code, nor the background color nor the foreground color are displayed
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// Build Window to hold everything
Window win = new Window();
win.ID = "Window1";
win.Layout = LayoutType.Form.ToString();
win.Title = "Test Controls";
win.Icon = Icon.Application;
win.Width = Unit.Pixel(600);
win.Height = Unit.Pixel(350);
win.Border = false;
win.Collapsible = true;
win.Plain = true;
Ext.Net.Label webLabel=new Ext.Net.Label();
webLabel.Text="This label should be red with green background";
//foreground color should be red and backgroud green
webLabel.ForeColor=System.Drawing.Color.Red;
webLabel.BackColor=System.Drawing.Color.Green;
win.Items.Add(webLabel);
// Add Window to Form
this.PlaceHolder1.Controls.Add(win);
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Simple BorderLayout - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
</head>
<body>
<ext:ResourceManager runat="server" />
<h1>Test</h1>
<ext:Button
ID="Button1"
runat="server"
Text="Show Window"
Icon="Application">
<Listeners>
<Click Handler="#{Window1}.show();" />
</Listeners>
</ext:Button>
<asp:PlaceHolder ID="PlaceHolder1" runat="server" />
</body>
</html>
Last edited by Daniil; Jan 14, 2015 at 9:05 AM.
Reason: [CLOSED]