[CLOSED] Css disable textfield

  1. #1

    [CLOSED] Css disable textfield

    Hi ,

    Is possible disable css textfield?
    Is there any property for that?

    Exemple:
    <p class="formLine required">
                <label class="wrapLbl"><span class="base">Usuário <span class="asterisk">*</span></span></label>            
                <span class="wrapTxt"><span class="base"> <ext:TextField ID="TxfNome" runat="server" /> </span></span>
            </p>
    I want my style maintained.

    Good night.
    Thanks.
    Last edited by geoffrey.mcgill; May 18, 2011 at 6:44 PM. Reason: [CLOSED]
  2. #2
    Hi,

    You can set the .Disabled property.

    Example

    <ext:TextField runat="server" Disabled="true" />
    Geoffrey McGill
    Founder
  3. #3
    Hi Geoffrey,

    Not disable the component.
    I want my CSS has priority. :)

    My styles :
    <span class="wrapTxt"><span class="base"> <ext:TextField ID="TxfNome" Disabled="true" runat="server" /> </span></span>
    Thanks.
  4. #4
    Hi,

    Unfortunately, I do not understand your requirements. The code sample(s) you provided do not include any css.
    Geoffrey McGill
    Founder
  5. #5
    Hi Geoffrey,

    I guess @stoque means <span> elements with class attribute.

    @stoque, please set empty .DisableClass for TextField.
    <ext:TextField ... DisableClass=" ">
  6. #6
    Hi Daniil,

    Later I do the test and post the result. I think that's right.

    Thanks.
  7. #7
    Oh, I've just realized that it won't work in IE (at least), because it manages disabled fields itself - it makes disabled fields gray and I don't no any way to override it.

    So, the following page looks different under IE and, for example, FF.

    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>
    
        <style type="text/css">
            .my-class input {
                color: Red;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <span class="my-class">
                <ext:TextField runat="server" Disabled="true" Text="Hello!" DisabledClass=" " />
            </span>
        </form>
    </body>
    </html>
    If you will know how to override it in IE, please feel free to post a solution:)

    And I should ask - what are you trying to achieve using <span>? I guess - your custom view, but I believe (not sure) you can avoid using additional <span> elements. Try to use .Cls property.

    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>
    
        <style type="text/css">
            .my-class input {
                color: Red;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:TextField runat="server" Disabled="true" Text="Hello!" Cls="my-class" />
        </form>
    </body>
    </html>
    See also
    http://dev.sencha.com/deploy/ext-3.3...eld&member=cls
    http://dev.sencha.com/deploy/ext-3.3...er=disabledCls
    http://dev.sencha.com/deploy/ext-3.3...member=overCls

Similar Threads

  1. Replies: 2
    Last Post: Mar 11, 2012, 3:55 AM
  2. [CLOSED] Textfield disable issue
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 16, 2011, 10:01 AM
  3. [CLOSED] Disable row on load
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 09, 2011, 6:43 PM
  4. [CLOSED] TriggerField disable
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 22, 2009, 10:34 AM
  5. TextField loose value if disable is true
    By jeybonnet in forum 1.x Help
    Replies: 4
    Last Post: Jan 07, 2009, 7:13 PM

Tags for this Thread

Posting Permissions