[1.0] Column layout doesn't render styles

  1. #1

    [1.0] Column layout doesn't render styles

    Hi,

    I have a Panel with Layout set to "Column". If I add a TextField control with ItemCls or LabelStyle properties, it is not rendering this class or style.

    However, if I set layout property to "Form" it works well.

    Dominik.
    Last edited by Dominik; Dec 22, 2010 at 7:57 AM.
  2. #2
    Hi,

    Yes, but this is not a bug.

    It works as expected in according to ExtJS docs. These properties make sense if it deals with FormLayout only, please see
    http://dev.sencha.com/deploy/dev/doc...member=itemCls
    http://dev.sencha.com/deploy/dev/doc...ber=labelStyle
  3. #3
    Ok,

    I need to add my own style to some controls inside a Column layout.

    How ca I do that? Must I put these controls first inside a Column and then in a Form? Is there some other work-around?

    Thanks,

    Dominik.
  4. #4
    Hi,

    Please use .Cls property of control.
  5. #5
    Yes,

    But I need to change the label style...
  6. #6
    Well, it would be best to use a container with 'form' layout.

    To achieve your requirement without 'form' layout please try to wrap each fields in <ext:Container> and set .LabelStyle for this.
    Last edited by Daniil; Dec 23, 2010 at 1:56 PM. Reason: Minor correction
  7. #7
    Im'm trying this, but it doesn't work, and furthermore it creates one column for the label and another one for the text field:

    <ext:Panel runat="server" Border="false" Layout="Column">
        <Items>
            <ext:Container runat="server" LabelStyle="color: blue">
                <Content>
                    <ext:TextField ID="Name" runat="server" FieldLabel="Name"
                        MaxLength="30" AllowBlank="false" ItemCls="required" Width="200" />           
                </Content>
            </ext:Container>                                       
        </Items>
    </ext:Panel>
  8. #8
    Hi,

    Add Layout="form" to the container and use Items instead Content
    <ext:Panel runat="server" Border="false" Layout="Column">
        <Items>
            <ext:Container runat="server" LabelStyle="color: blue" Layout="form">
                <Items>
                    <ext:TextField ID="Name" runat="server" FieldLabel="Name"
                        MaxLength="30" AllowBlank="false" ItemCls="required" Width="200" />           
                </Items>
            </ext:Container>                                       
        </Items>
    </ext:Panel>
  9. #9
    Ok,

    If there is not a simpliest way, it works by the moment.

    Thanks.

Similar Threads

  1. Replies: 2
    Last Post: Aug 15, 2011, 4:03 PM
  2. Replies: 27
    Last Post: May 17, 2011, 9:41 PM
  3. [CLOSED] Column Layout doesn't expand in TabPanel Body
    By HOWARDJ in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 12, 2010, 1:26 PM
  4. TableLayout doesn't render dynamically
    By Born2Code in forum 1.x Help
    Replies: 0
    Last Post: Jan 27, 2010, 3:06 AM
  5. Panel with Frame true doesn't render at all
    By sz_146 in forum 1.x Help
    Replies: 2
    Last Post: Dec 02, 2008, 11:48 AM

Posting Permissions