Results 1 to 3 of 3

Thread: TextField in toolbar (how to make it use all the remaining width)

  1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    3
    Vote Rating
    0
      0  

    Default TextField in toolbar (how to make it use all the remaining width)

    Hi,

    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?

    Thanks,
    Tarandeep

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    Simple add an Events.Resize listener to your "window" and if that fires, resize the textfield to the new size.

  3. #3
    Ext User
    Join Date
    Aug 2008
    Posts
    3
    Vote Rating
    0
      0  

    Default

    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?

    thanks!

Similar Threads

  1. toolbar textfield not going 100% width
    By rballman in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 12 Jun 2009, 7:35 AM
  2. How to make a textfield 100% width?
    By frafu in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 11 Jun 2009, 8:14 PM
  3. How to make form fields 100% width?
    By mpaciga in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 4 Feb 2009, 2:41 PM
  4. How i make a mask for a TextField
    By vanderbill in forum Ext GWT: Help & Discussion (1.x)
    Replies: 6
    Last Post: 23 Jul 2008, 2:50 AM
  5. How can I make the width of editorGrid fit with the width of it's container?
    By deng.xiong in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 14 Apr 2008, 5:40 PM

Posting Permissions

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