View Full Version : How to refresh input label
5 May 2011, 1:34 AM
I also put this question on Stack Overflow: http://stackoverflow.com/questions/5893377/sencha-touch-how-to-refresh-input-label/5893773
Does anyone know how to solve this ?
5 May 2011, 1:39 AM
Try targetting the label element instead.
5 May 2011, 1:41 AM
And do what with the label element ? I'm afraid I don't fully understand ...
5 May 2011, 1:51 AM
yeah, that's what the API docs are for. When you read those for the select field you'll see that label is not a public property but labelEl is. Follow the docs to Ext.Element and hey presto:
musicInCarInput.labelEl.setHTML([your hmtl stuff])
5 May 2011, 1:56 AM
The docs also says that the select has a doLayout() method, and that the SegmentedButton's getPressed() method return void... This labelEl I've missed, sorry.
Thank you for your answer. I'll try it right away!
5 May 2011, 2:03 AM
doLayout() says :
Force this container's layout to be recalculated. A call to this function is required after adding a new component to an already rendered container, or possibly after changing sizing/position properties of child components.
You didn't add new components, nor changed child components.
5 May 2011, 2:05 AM
I know, but the problem is that I get this when I try to call doLayout() on that select:
Uncaught TypeError: Object [object Object] has no method 'doLayout'
5 May 2011, 2:12 AM
How did you call doLayout?
5 May 2011, 3:55 AM
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.