26 Oct 2010 11:03 PM #1
TextField in toolbar (how to make it use all the remaining width)
I want to add a TextField to a tool bar that already has couple of buttons. I want the text field to use all of the remaining space.
How can I do this?
Also, when the toolbar (window) is resized, how to resize the text field?
27 Oct 2010 1:30 AM #2
Simple add an Events.Resize listener to your "window" and if that fires, resize the textfield to the new size.
27 Oct 2010 2:43 PM #3
Ok, I have done this- on window resize, I compute the size of other buttons in the tool bar, subtract this from current size of tool bar and get the remaining size that I will give to text field. This works, is this the same thing you were saying?
Also, this still leaves the problem of - how to initialize the text field size. I mean the above trick works when window is resized, but when the web app loads, how to get the size of tool bar and hence compute the size of text filed?
By rballman in forum Ext 2.x: Help & DiscussionReplies: 8Last Post: 12 Jun 2009, 7:35 AM
By frafu in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 11 Jun 2009, 8:14 PM
By mpaciga in forum Ext GWT: Help & Discussion (1.x)Replies: 4Last Post: 4 Feb 2009, 2:41 PM
By vanderbill in forum Ext GWT: Help & Discussion (1.x)Replies: 6Last Post: 23 Jul 2008, 2:50 AM
By deng.xiong in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 14 Apr 2008, 5:40 PM