[CLOSED] resize FieldLabel

  1. #1

    [CLOSED] resize FieldLabel

    In this example we have the textbox that automatically resize.

    https://examples1.ext.net/#/GridPane.../Form_Details/

    you can resize the same way the FieldLabel?
    Last edited by Daniil; Dec 15, 2010 at 10:29 AM. Reason: [CLOSED]
  2. #2
    Hi,

    No, the labelWidth is fixed.

    Also I'm not sure how it should look... Could you clarify?
  3. #3
    The request of my boss.
    His question is this:

    seen that there is much space available, fieldlabel because it is so close?
    Attached Thumbnails Click image for larger version. 

Name:	Cattura.JPG 
Views:	121 
Size:	67.1 KB 
ID:	2024  
  4. #4
    Hi,

    I'm not sure what space you mean.

    I can suggest you to use Note.

    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:FormPanel runat="server">
            <Items>
                <ext:TextField runat="server" FieldLabel="Short FieldLabel" />
                <ext:TextField runat="server" FieldLabel="Too too too too too too too too too long FieldLabel" />
            </Items>
        </ext:FormPanel>
        <ext:FormPanel runat="server">
            <Items>
                <ext:TextField runat="server" FieldLabel="Short FieldLabel" />
                <ext:TextField runat="server" FieldLabel="Short main name" Note="Description of this field" />
            </Items>
        </ext:FormPanel>
        </form>
    </body>
    </html>
  5. #5
    No, the labelWidth is fixed.
    How do I set?
    in your example is 100 px.
    <label class="x-form-item-label" style="width: 100px;" for="TextField2" id="ext-gen18">Too too too too too too too too too long FieldLabel:</label>
    This is the html code
  6. #6
    Hi,

    There is the respective property of container.

    Example
    <ext:FormPanel runat="server" LabelWidth="300">
        <Items>
            <ext:TextField runat="server" FieldLabel="Short FieldLabel" />
            <ext:TextField runat="server" FieldLabel="Too too too too too too too too too long FieldLabel" />
        </Items>
    </ext:FormPanel>
  7. #7
    you can only set the initial loading of the page?
  8. #8
    Hi,

    Updating on the fly can look like this:

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Update(object sender, DirectEventArgs e)
        {
            this.FormPanel1.LabelWidth = 300;
            this.Viewport1.UpdateContent();
        }
    </script>
    
    <!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:Viewport ID="Viewport1" runat="server">
            <Items>
                <ext:FormPanel 
                    ID="FormPanel1" 
                    runat="server" 
                    Region="Center" 
                    Width="500">
                    <Items>
                        <ext:TextField runat="server" FieldLabel="Short FieldLabel" />
                        <ext:TextField runat="server" FieldLabel="Too too too too too too too too too long FieldLabel" />
                    </Items>
                    <Buttons>
                        <ext:Button runat="server" Text="Test" OnDirectClick="Update" />
                    </Buttons>
                </ext:FormPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by Daniil; Dec 15, 2010 at 10:28 AM. Reason: Minor correction

Similar Threads

  1. [CLOSED] Use CSS Class for FieldLabel
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Sep 07, 2012, 6:05 PM
  2. [CLOSED] Change FieldLabel
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 12, 2010, 5:07 PM
  3. [CLOSED] Textfield Fieldlabel
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Dec 02, 2009, 5:45 PM
  4. [CLOSED] FieldLabel for RadioGroup
    By alexp in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 16, 2009, 11:38 AM
  5. Replies: 3
    Last Post: Feb 22, 2009, 2:58 PM

Posting Permissions