Results 1 to 5 of 5

Thread: trackLabels work?

  1. #1
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,385
    Vote Rating
    1540
      0  

    Default trackLabels work?

    So I want to have the label hide when the field is hidden however I cannot get it to work. I've tried 2 ways:

    Code:
    				xtype      : "textfield",
    				id         : "remoteLocation",
    				fieldLabel : "Location",
    				anchor     : "100%",
    				trackLabels: true,
    				hidden     : true
    and:

    Code:
    				xtype      : "textfield",
    				id         : "remoteLocation",
    				fieldLabel : "Location",
    				anchor     : "100%",
    				trackLabels: true
    and calling:

    Code:
    Ext.getCmp("remoteLocation").hide();
    However the label is still there. Now if I set hideLabel: true then it will hide it but when the field is shown again, the label is not there and the space is gone as well.

    Now I can setup an event listener for hide on the textfield and do:
    Code:
    t.label.hide();
    but doesn't that defeat the purpose of the trackLabels config option?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,235
    Vote Rating
    1015
      0  
    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.

  3. #3
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,385
    Vote Rating
    1540
      0  

    Default

    Yes I know, that is how I found it. I can produce screenshots but it's not working for me when I set hidden: true in the config or if I call the hide() method. I have a Window with a form and a few textfields but the label remains unless I hide() the label Element.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,235
    Vote Rating
    1015
      0  

    Default

    As in, it's an option on the form layout. You're specifying it as an option on the text field.
    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.

  5. #5
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,385
    Vote Rating
    1540
      0  

    Default

    Wow... ok I'm wrong lol Thanks!
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

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