AutoWidth for FormLayout LabelWidth

  1. #1

    AutoWidth for FormLayout LabelWidth

    Is there any way to have the FormLayout LabelWidth be automatically set to fit the size of the label text?

  2. #2

    RE: AutoWidth for FormLayout LabelWidth

    The answer seems to be a big NO, at least not without doing some kind of plugin.

    This is an issue raised alot on the ExtJs forums as well, citing the same issue I have which is that you don't always know what text is going to be used for the Label. i.e. Internationalization.

    Here is one post that looks interesting:

    I don't suppose anyone has already done this???
  3. #3

    RE: AutoWidth for FormLayout LabelWidth


    Yes, you are right.

    At this moment the FormLayout does not support it.

    It is need to change FormLayout (javascript) and use Ext.util.TextMetrics to determine label width (the using of TextMetrics you can see in this post
    Last edited by geoffrey.mcgill; Feb 20, 2011 at 1:28 PM.
    Vladimir Shcheglov
    Sr. Developer
  4. #4

    RE: AutoWidth for FormLayout LabelWidth

    Hi Randy,

    This is an expensive process to perform client-side and could/would affect rendering times. It would be much better to try and calculate an approximate width on the server and set the LabelWidth property.

    We might be able to implement client-side calculation in a future release. I think it would be a handy feature to have, although it's going to take time to develop and test. 

    I'm moving this thread to the Feature Requests forums so we can better track the request. 

    Geoffrey McGill
    Founder & CEO

Similar Threads

  1. [CLOSED] CompositeField LabelWidth
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 19, 2012, 12:55 PM
  2. Replies: 4
    Last Post: Jul 29, 2011, 7:02 AM
  3. Setting LabelWidth depending on text length
    By Ealirene in forum 1.x Help
    Replies: 5
    Last Post: Jul 19, 2010, 11:25 AM
  4. [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
  5. [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

Posting Permissions