Results 1 to 6 of 6

Thread: labelWidth is ignored with "top" labelAlign

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-6086 in a recent build.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018

    Default labelWidth is ignored with "top" labelAlign

    REQUIRED INFORMATION

    Ext version tested:

    • Ext 4.1.0

    Browser versions tested against:

    • Chrome 18
    • IE9
    • FF 12

    All on Windows 7.

    Description:
    • labelWidth seems to be ignored if labelAlign is "top". The label width equals the field width.

    Steps to reproduce the problem:

    • Just run the script below.

    The result that was expected:
    • I expect the fieldLabel width to be 300.

    The result that occurs instead:
    • The fieldLabel width appears to be equal the field width, i.e. 70.

    Test Case:
    Code:
    Ext.onReady(function () {
        Ext.create("Ext.form.Panel", {
            renderTo: Ext.getBody(),
            items: [{
                width      : 70,
                xtype      : "textfield",
                fieldLabel : "Some long label label label label label label label label",
                labelAlign : "top",
                labelWidth : 300
            }]
        });
    });

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410

    Default

    Thank you for the report.

    Regards,
    Scott.

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018

    Default

    Always glad to help to make ExtJS better

  4. #4
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018

    Default

    Hi Scott,

    Seems it has not been fixed.

    Generally, according to the Docs, the labelWidth is only applicable if the labelAlign is set to "left" or "right".

    So, could you clarify what exactly has been fixed?

  5. #5
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    The underlying problem was that there was no way to specify the input width. So if you wanted to restrict the field size to be small, but you want the label to stretch, you couldn't do so.

    As such, we changed the structure so you can specify an inputWidth config that sizes the input element, which then allows the label to stretch as well. inputWidth will also apply to left/right.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  6. #6
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018

    Default

    Great, thanks for clarification!

    It would be worth for others if this config option would appear in the Docs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •