PDA

View Full Version : How to extend TextField and insert additional component between the Label and Text



Jarrod Roberson
3 Jul 2013, 10:23 PM
The TextField that is supplied by ExtJS 4.2.1 is basically a Label and a TextField inside aContainer set to layout hbox.
I need to insert a ComboBox in between the Label and the TextField inside the Container.
I have tried to extend the TextField class but can't find anything that concretely shows the appropriate syntax for adding a Component to another Components hierarchy.
Can someone please post an answer code snippet or link to something that explains to someone that is brand new to ExtJS how to extend a component and modify it like I am trying to?
I just need to be pointed in the right direction and I think I can run with it.

slemmon
8 Jul 2013, 10:27 AM
A fieldcontainer should do just what you're needing. Check out the example at the top of the API docs page here:
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.FieldContainer