[CLOSED] TextField align with StyleSpec

  1. #1

    [CLOSED] TextField align with StyleSpec

    In version 1.x, I used a stylespec to align the text in textfield with the code bellow... and this code works very fine...

    <ext:TextField runat="server" ID="txtMulta" FieldLabel="Multa (%)" Text="0,00" MaxLength="10" StyleSpec="text-align:right" EnableKeyEvents="true" X="320" Y="50" Width="85px">
    But, after a upgrade the ext.net to 2.x, the LABEL of field is align to right, and the text still left-aligned.

    Attachment 3756

    I believe it may have changed the way to do this aligment... any help?
    Last edited by Daniil; Jan 24, 2012 at 3:08 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Confirmed, it won't work in v2 anymore.

    The two possible solutions are below.

    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-text-field input.x-form-text {
                text-align: right;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:TextField runat="server" Text="Hello World!" FieldStyle="text-align: right;" />
            <ext:TextField runat="server" Text="Hello World!" Cls="my-text-field" />
        </form>
    </body>
    </html>
  3. #3
    Hi Daniil

    Thanks for your response

    Using FieldStyle="text-align: right;" , works fine...

    Thanks a lot

Similar Threads

  1. [CLOSED] [1.0] TextField align?
    By edigital in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 05, 2010, 11:38 AM
  2. [CLOSED] StyleSpec für Buttons
    By macap in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 24, 2010, 12:51 PM
  3. Replies: 1
    Last Post: May 25, 2009, 6:00 PM
  4. [CLOSED] Changing StyleSpec of Label
    By danielg in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 26, 2009, 9:04 AM
  5. Align TextField
    By flaviodamaia in forum 1.x Help
    Replies: 0
    Last Post: Nov 18, 2008, 9:31 AM

Posting Permissions