-
16 Sep 2008 3:02 AM #1
Changing TextField Width..please help
Changing TextField Width..please help
Hi all,
I have made a textfield on the toptool bar of the window
var Box = new Ext.form.TextField({
id: UrlBoxId,
value: 'Enter',
grow: true,
selectOnFocus: true,
growMin: 100,
But while resizing the window, since there is no growmax: ,the textfield goes outside the window. how can i give a floating growmax: so that it changes as per the window size?????
please help me
-
16 Sep 2008 4:35 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
have you tried growMax? I don't see it in your code

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
16 Sep 2008 11:39 PM #3
Thanks for your reply.
I have given growMax:300.
but problem occurs when we resize the window size and window width goes below 300.
-
16 Sep 2008 11:48 PM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Does it really have to grow? Can't you just set an anchor to make it always fill the remaining space?
-
17 Sep 2008 12:28 AM #5
Hi,
If it grows it will be good. but if its not possible have to go for your idea.
Can you explain me without growing how can i do that?
-
17 Sep 2008 12:48 AM #6
put it inside a formpanel and set anchor to 100%
Make everything as simple as possible, but not simpler.
- Albert Einstein
-
17 Sep 2008 12:53 AM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Actually use:
(both horizontal and vertical)Code:anchor: '1 1'
In some cases you need to do something like:
(to account for buttons or bottom toolbars)Code:anchor: '-2 -150'
-
17 Sep 2008 1:05 AM #8
Hi ,
Sorry I couldnt get u...
Can you please show me some sample code???
-
17 Sep 2008 1:10 AM #9Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Example:
Code:var win = new Ext.Window({ ... layout: 'anchor', items: [{ xtype: 'textfield', value: 'Enter', selectOnFocus: true, anchor: '1' }] });
-
17 Sep 2008 1:35 AM #10
Thanks for your reply
But its not working.
I made width:300
and given anchor 100% but
when i resizes window in such a way that window width < 300,
the width of the textbox not resizes but ir breaks


Reply With Quote