PDA

View Full Version : [CLOSED] DisplayField font-size not changed using StyleSpec



supera
Jan 24, 2012, 12:15 PM
In version 1.x, the code bellow works very fine...



<ext:DisplayField runat="server" ID="dsMsg" X="5" Y="170" Width="500px" Style="font-size:9px" Text="*O número do contrato identifica a dívida junto ao cliente(loja). Pode ser o nº da nota fiscal, duplica, cheque, etc." />


After upgrading for 2.x version of ext.net, this code don´t work anymore...

I try change the


Style="font-size:9px"


For


StyleSpec="font-size:9px"


did not work too

Any help?

Daniil
Jan 24, 2012, 3:42 PM
Hi,

Confirmed, it won't work in v2 anymore.

I can suggest the following solution.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET v2 Example</title>

<style type="text/css">
.my-display-field .x-form-display-field {
font-size: 9px;
}
</style>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:DisplayField runat="server" Text="Hello World!" Cls="my-display-field" />
</form>
</body>
</html>

supera
Jan 24, 2012, 3:58 PM
Hi Daniil...

I use a FieldStyle="font-size:9px", as suggested by you in another thread, and works...

Thanks a lot