[CLOSED] CompositeField LabelWidth

  1. #1

    [CLOSED] CompositeField LabelWidth


    I'm trying to set the length of the CompositeField Label property in order to have its controls left-aligned with the FormPanel's controls just above. CompositeFields reside on a FormPanel-nested FieldsSet and therefore are right-shifted a bit. Setting LabelWidth seemingly has no effect. Please suggest the correct approach to achieve the controls alignment.
    Last edited by geoffrey.mcgill; Jul 19, 2012 at 1:11 PM. Reason: [CLOSED]
  2. #2
    Please start us off with a simple sample demonstrating what you have configured so far.

    The following forum posts provide guides on submitting forum posts and code samples:


    Geoffrey McGill
  3. #3
    I'm trying to left-align the FirstField and LastName text fields. Please advise how to approach this.

    <%@ Page Language="C#" %>
    <%@ Register TagPrefix="ext" Namespace="Ext.Net" Assembly="Ext.Net" %>
    <!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">
        <form id="form1" runat="server">
        <ext:ResourceManager runat="server" />
                <ext:FormPanel runat="server" Padding="10" LabelAlign="Left" Border="true"
                    Width="500" Frame="true">
                        <ext:CompositeField runat="server" FieldLabel="First Field">
                                <ext:TextField runat="server" Width="100" />
                                <ext:ToolbarSpacer Width="20">
                                <ext:DisplayField runat="server" Text="Date:" Width="60">
                                <ext:DateField runat="server" Editable="false" Width="100">
                        <ext:FieldSet runat="server" Title="Search Criteria" Layout="FormLayout">
                                <ext:CompositeField runat="server" FieldLabel="Last Name">
                                        <ext:TextField runat="server" Width="100" />
                                        <ext:DisplayField runat="server" Text="First&nbsp;Name:" Width="60">
                                        <ext:TextField runat="server" Width="100" />
                                <ext:CompositeField ID="CompositeField2" runat="server" FieldLabel="Province">
                                        <ext:TextField runat="server" Width="100" />
                                        <ext:DisplayField runat="server" Text="City:" Width="60">
                                        <ext:TextField runat="server" Width="100" />
  4. #4

    Thanks for the sample.

    You should set up LabelWidth for the containers, not for the fields.

    For example,
    for the FormPanel and
    for the FieldSet.

    See also

    In Ext.NET v2 this and other FieldLabel settings can be specified for separate fields.
  5. #5
    Thanks for the clarification Daniil! That's explained it pretty well. You can mark this thread as resolved.

Similar Threads

  1. Replies: 4
    Last Post: Jul 29, 2011, 7:02 AM
  2. Setting LabelWidth depending on text length
    By Ealirene in forum 1.x Help
    Replies: 5
    Last Post: Jul 19, 2010, 11:25 AM
  3. [CLOSED] [1.0] Checkbox Group not applying labelwidth for childs
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 12, 2010, 12:11 PM
  4. [CLOSED] [1.0] Latest SVN issue with MultiField LabelWidth
    By bsnezw in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Feb 03, 2010, 11:05 AM
  5. AutoWidth for FormLayout LabelWidth
    By randy85253 in forum Feature Requests
    Replies: 3
    Last Post: May 05, 2009, 2:06 PM

Tags for this Thread

Posting Permissions