-
17 Jan 2008 10:52 AM #1
simple TriggerField() example?
simple TriggerField() example?
can someone point me in the direction of a simple TriggerField() example. i'd like to have a search field with the little magnifying glass button as in this example...
http://extjs.com/deploy/dev/examples/form/custom.html
but the included SearchField.js is far more than i need...and the code is a bit over my head
-
17 Jan 2008 1:35 PM #2
It's only a few lines, which bits don't you understand?
-
17 Jan 2008 1:37 PM #3
well, it looks like it's trying to extend another class? isn't there a simple way to do an inline TriggerField()? Same as you would for a comboBox() or TextField()?
-
24 Jan 2008 6:41 AM #4
If you mean you just want the magnifying glass then just change the triggerClass to x-form-search-trigger.
-
24 Jan 2008 7:06 AM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Example:
Code:var triggerField = new Ext.form.TriggerField({ 'fieldLabel': 'Search', 'triggerClass': 'x-form-search-trigger', 'onTriggerClick': function() { // perform search } });
-
24 Jan 2008 9:23 AM #6
That's exactly what i was looking for, thanks again Condor!
-
7 Apr 2010 9:53 AM #7
How can i get the value entered in the text field?
-
7 Apr 2010 10:46 PM #8Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Code:onTriggerClick: function() { var value = this.getValue(); ... }


Reply With Quote