Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Help tip on text field

  1. #11
    Sencha User
    Join Date
    Jun 2008
    Posts
    316
    Vote Rating
    24
      0  

    Default

    Quote Originally Posted by Condor View Post
    Code:
    Ext.override(Ext.form.Field, {
        afterRender: Ext.form.Field.prototype.afterRender.createSequence(function(){
            if(this.qtip){
                var target = this.getTipTarget();
                if(typeof this.qtip == 'object'){
                    Ext.QuickTips.register(Ext.apply({
                          target: target
                    }, this.qtip));
                } else {
                    target.dom.qtip = this.qtip;
                }
            }
        }),
        getTipTarget: function(){
            return this.el;
        }
    });
    Ext.override(Ext.form.Checkbox, {
        getTipTarget: function(){
            return this.imageEl;
        }
    });
    This works quite well, but I noticed that the tool tips on the fields disappear after resetting the form. How should the method reset be overridden to fix this problem?

  2. #12
    Sencha User msarath's Avatar
    Join Date
    Oct 2009
    Location
    Bangalore, IN
    Posts
    20
    Vote Rating
    1
      0  

    Question Possible to add an icon in textfield?

    I have a textfield to input search string.
    I added default text.
    Is there a way I can add 'search icon' in left corner of textfield?
    - usually we see in yahoo mail search, firebug search fields.

  3. #13
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    Use a css background image and left padding for that (you'll loose the gradient gray background though).

  4. #14
    Sencha User msarath's Avatar
    Join Date
    Oct 2009
    Location
    Bangalore, IN
    Posts
    20
    Vote Rating
    1
      0  

    Thumbs up Thanks for the quick response. It worked!

    If anybody else is looking for similar functionality...

    xtype:'textfield',
    id:'filter',
    width: 180,
    emptyText:'Search a Space',
    style: "background-image:url('/images/magnifying-glass.gif');background-repeat:no-repeat;padding-left:18px;"

    Thanks!

  5. #15
    Sencha User
    Join Date
    Mar 2009
    Posts
    227
    Vote Rating
    3
      0  

    Default

    Quote Originally Posted by msarath View Post
    I have a textfield to input search string.
    I added default text.
    Is there a way I can add 'search icon' in left corner of textfield?
    - usually we see in yahoo mail search, firebug search fields.
    why din't you use a trigger fielf instead?

    thats what i do...
    Attached Images Attached Images

  6. #16
    Sencha User msarath's Avatar
    Join Date
    Oct 2009
    Location
    Bangalore, IN
    Posts
    20
    Vote Rating
    1
      0  

    Default

    I was using the same until yesterday. But in FF the 'x' icon was showing before the text field and also when I tried to add a new enable/disable icon it was hidden behind the trigger field.
    So, I have changed the code to use textfield.

    Can you share the code to generate the trigger field as in your attachment?

  7. #17
    Sencha User
    Join Date
    Mar 2009
    Posts
    227
    Vote Rating
    3
      0  

    Default

    do you want the all the code - trigger field + appended field - or you only need the trigger field - with the search button?

  8. #18
    Sencha User msarath's Avatar
    Join Date
    Oct 2009
    Location
    Bangalore, IN
    Posts
    20
    Vote Rating
    1
      0  

    Default

    trigger field + appended field please.
    because i have trigger field + icon.
    icon is to enable/disable the trigger field.

  9. #19
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    If the trigger shows on the left over the input field then the combobox was rendered when it had no size (width=0). This is also the case when the combobox is rendered inside a display:none container.

    The most common cause is that the combobox is rendered inside a card layout (e.g. TabPanel) or inside a collapsed panel.

    For a card layout (TabPanel) you can solve this by setting the card (tabpage) to hideMode:'offsets'.

  10. #20
    Sencha User
    Join Date
    Mar 2009
    Posts
    227
    Vote Rating
    3
      0  

    Default

    ok i just post a holl lot of code to you but received a message that an admin will have to approve it O.o

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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