Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: Help

Reply
 
Thread Tools
  #11  
Old 07-10-2009, 12:10 PM
Qtx Qtx is offline
Ext User
 
Join Date: Jun 2008
Posts: 37
Qtx is on a distinguished road
Default

Quote:
Originally Posted by Condor View Post
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?
Reply With Quote
  #12  
Old 11-05-2009, 03:06 AM
msarath msarath is offline
Ext User
 
Join Date: Oct 2009
Posts: 8
msarath is on a distinguished road
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.
Reply With Quote
  #13  
Old 11-05-2009, 03:51 AM
Condor's Avatar
Condor Condor is online now
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: The Netherlands
Posts: 14,250
Condor is on a distinguished road
Default

Use a css background image and left padding for that (you'll loose the gradient gray background though).
__________________
Condor
Reply With Quote
  #14  
Old 11-05-2009, 04:29 AM
msarath msarath is offline
Ext User
 
Join Date: Oct 2009
Posts: 8
msarath is on a distinguished road
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!
Reply With Quote
  #15  
Old 11-05-2009, 04:41 AM
SchattenMann SchattenMann is offline
Ext User
 
Join Date: Mar 2009
Posts: 151
SchattenMann is on a distinguished road
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
File Type: png ss3.png (1.6 KB, 9 views)
Reply With Quote
  #16  
Old 11-05-2009, 04:48 AM
msarath msarath is offline
Ext User
 
Join Date: Oct 2009
Posts: 8
msarath is on a distinguished road
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?
Reply With Quote
  #17  
Old 11-05-2009, 04:52 AM
SchattenMann SchattenMann is offline
Ext User
 
Join Date: Mar 2009
Posts: 151
SchattenMann is on a distinguished road
Default

do you want the all the code - trigger field + appended field - or you only need the trigger field - with the search button?
Reply With Quote
  #18  
Old 11-05-2009, 04:55 AM
msarath msarath is offline
Ext User
 
Join Date: Oct 2009
Posts: 8
msarath is on a distinguished road
Default

trigger field + appended field please.
because i have trigger field + icon.
icon is to enable/disable the trigger field.
Reply With Quote
  #19  
Old 11-05-2009, 05:03 AM
Condor's Avatar
Condor Condor is online now
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: The Netherlands
Posts: 14,250
Condor is on a distinguished road
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'.
__________________
Condor
Reply With Quote
  #20  
Old 11-05-2009, 05:05 AM
SchattenMann SchattenMann is offline
Ext User
 
Join Date: Mar 2009
Posts: 151
SchattenMann is on a distinguished road
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
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 03:25 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.