[CLOSED] IndicatorText

  1. #1

    [CLOSED] IndicatorText

    How can I make IndicatorText is aligned to the left of FieldLabel.
    Using the example below
    <ext:TextField ID="txtUsuario" runat="server" FieldLabel="Usuário" AllowBlank="false"
    
    Width="300" IndicatorTip="Teste" IndicatorText="*" IndicatorCls="red-text" LabelAlign="Right" />
    Last edited by Daniil; Apr 01, 2011 at 12:35 PM. Reason: [CLOSED]
  2. #2
  3. #3
    Quote Originally Posted by Daniil View Post
    I need the label aligned to the right of TextFild Indicator and aligned to the left of the label, as shown in the picture attached.
  4. #4
    Well, there is no such option.

    I was able to create a layout to get the picture like your screen-shot, but it's huge.

    I will consider this with other team members. Maybe, we will decide to create a Feature ticket, but I'm not sure, maybe, there is much easier solution than the following one.

    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">
            .red-text {
                color: red;
                font-size: large;
            }
            .my-label {
                padding-top: 3px !important;
                padding-bottom: 3px;
            }
        </style>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:FormPanel runat="server" HideLabels="true" Width="250">
            <Items>
                <ext:CompositeField runat="server" AnchorHorizontal="-5">
                    <LayoutConfig Pack="End" />
                    <Items>
                        <ext:Container runat="server" Layout="FormLayout" HideLabels="true" Height="20">
                            <Items>
                                <ext:DisplayField runat="server" IndicatorText="*" IndicatorCls="red-text" Width="1" />
                            </Items>
                        </ext:Container>
                        <ext:BoxComponent runat="server" Width="5" />
                        <ext:DisplayField runat="server" Text="Label:" Cls="my-label" />
                        <ext:TextField runat="server" Width="150" />
                    </Items>
                </ext:CompositeField>
                <ext:CompositeField runat="server" AnchorHorizontal="-5">
                    <LayoutConfig Pack="End" />
                    <Items>
                        <ext:Container runat="server" Layout="FormLayout" HideLabels="true" Height="20">
                            <Items>
                                <ext:DisplayField runat="server" IndicatorText="*" IndicatorCls="red-text" Width="1" />
                            </Items>
                        </ext:Container>
                        <ext:BoxComponent runat="server" Width="5" />
                        <ext:DisplayField runat="server" Text="Label Label:" Cls="my-label" />
                        <ext:ComboBox runat="server" Width="150" />
                    </Items>
                </ext:CompositeField>
                <ext:CompositeField runat="server" AnchorHorizontal="-5">
                    <LayoutConfig Pack="End" />
                    <Items>
                        <ext:DisplayField runat="server" Text="Label:" Cls="my-label" />
                        <ext:TextField runat="server" Width="86" />
                        <ext:DisplayField runat="server" Text="sometihng" />
                    </Items>
                </ext:CompositeField>
            </Items>
        </ext:FormPanel>
        </form>
    </body>
    </html>
  5. #5
    Quote Originally Posted by Daniil View Post
    I will consider this with other team members. Maybe, we will decide to create a Feature ticket, but I'm not sure, maybe, there is much easier solution than the following one.

    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">
            .red-text {
                color: red;
                font-size: large;
            }
            .my-label {
                padding-top: 3px !important;
                padding-bottom: 3px;
            }
        </style>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:FormPanel runat="server" HideLabels="true" Width="250">
            <Items>
                <ext:CompositeField runat="server" AnchorHorizontal="-5">
                    <LayoutConfig Pack="End" />
                    <Items>
                        <ext:Container runat="server" Layout="FormLayout" HideLabels="true" Height="20">
                            <Items>
                                <ext:DisplayField runat="server" IndicatorText="*" IndicatorCls="red-text" Width="1" />
                            </Items>
                        </ext:Container>
                        <ext:BoxComponent runat="server" Width="5" />
                        <ext:DisplayField runat="server" Text="Label:" Cls="my-label" />
                        <ext:TextField runat="server" Width="150" />
                    </Items>
                </ext:CompositeField>
                <ext:CompositeField runat="server" AnchorHorizontal="-5">
                    <LayoutConfig Pack="End" />
                    <Items>
                        <ext:Container runat="server" Layout="FormLayout" HideLabels="true" Height="20">
                            <Items>
                                <ext:DisplayField runat="server" IndicatorText="*" IndicatorCls="red-text" Width="1" />
                            </Items>
                        </ext:Container>
                        <ext:BoxComponent runat="server" Width="5" />
                        <ext:DisplayField runat="server" Text="Label Label:" Cls="my-label" />
                        <ext:ComboBox runat="server" Width="150" />
                    </Items>
                </ext:CompositeField>
                <ext:CompositeField runat="server" AnchorHorizontal="-5">
                    <LayoutConfig Pack="End" />
                    <Items>
                        <ext:DisplayField runat="server" Text="Label:" Cls="my-label" />
                        <ext:TextField runat="server" Width="86" />
                        <ext:DisplayField runat="server" Text="sometihng" />
                    </Items>
                </ext:CompositeField>
            </Items>
        </ext:FormPanel>
        </form>
    </body>
    </html>
    The other members told that this way is good.

Similar Threads

  1. Replies: 3
    Last Post: May 20, 2011, 8:55 PM

Posting Permissions