Label text size different.

  1. #1

    Label text size different.

    This will produce text of size 12px.
    <ext:Label ID="myID" runat="server" Icon="Error" Text="This is a test." />
    This will produce test of size 11px.
    <ext:Label ID="myID" runat="server" Icon="Error">This is a test.</ext:Label>
    Any reason why this is so? Does the wrapped text take the default size of the Panel it is in, and how do you set (or override) the default size of a panel text?
    Last edited by geoffrey.mcgill; Dec 30, 2011 at 7:21 PM. Reason: please use [CODE] tags
  2. #2
    Hi,

    The following two labels appears to be rendered the same way.

    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 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Label runat="server" Icon="Error" Text="This is a test." />
            <ext:Label runat="server" Icon="Error">This is a test.</ext:Label>
        </form>
    </body>
    </html>
    Though the first one is rendered with:
    text : "This is a test."
    but the second one with:
    html : "This is a test."
    See also
    http://docs.sencha.com/ext-js/3-4/#!...Label-cfg-text
    http://docs.sencha.com/ext-js/3-4/#!...Label-cfg-html

    and how do you set (or override) the default size of a panel text?
    You should be able to apply a respective CSS rule using the Panel's Cls, BodyCls, StyleSpec, BodyStyle properties, please see:
    http://docs.ext.net/

Similar Threads

  1. How to change size of a label in a NumberField
    By extNewBee in forum 1.x Help
    Replies: 2
    Last Post: May 24, 2012, 12:20 PM
  2. Replies: 1
    Last Post: Sep 24, 2011, 10:52 PM
  3. How to set Label Font size and color
    By Dinesh.T in forum 1.x Help
    Replies: 6
    Last Post: Aug 11, 2009, 2:17 PM
  4. [CLOSED] Change size of text of toolbar buttons
    By Sharon in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 23, 2009, 6:13 AM
  5. Label with Empty Text
    By Jack in forum 1.x Help
    Replies: 1
    Last Post: Nov 07, 2008, 3:21 AM

Tags for this Thread

Posting Permissions