PDA

View Full Version : text box with search icon at end



vipinmohit_sencha
4 Jun 2012, 1:00 AM
how to create text box with search icon at the end in extjs 4

thanks,
vipin mohit

Moinsen
4 Jun 2012, 1:12 AM
Hi,

try this:


{
xtype: 'label',
text: 'Search',
style: 'padding: 5px; text-align: left',
width: 50
},
{
xtype: 'trigger',
triggerCls : Ext.baseCSSPrefix + 'form-search-trigger',
flex: 1,
name: 'artikel',
allowBlank: true,
style: 'margin-left: 5px'
},

vipinmohit_sencha
4 Jun 2012, 1:46 AM
Thanks for reply.
can you please explain me that how it will work
I guess you are trying to put one label after text box which will act as Icon?

Moinsen
4 Jun 2012, 1:52 AM
Hi,

the label is not necessary just use the 'trigger'. Thats a textfield with a right aligned search button.

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.Trigger

vipinmohit_sencha
4 Jun 2012, 2:02 AM
Thanks a lot Moinsen