Home > DeveloperSection > Forums > How to hide/unhide clearicon from textbox in sencha?
Royce Roy
Royce Roy

Total Post:134

Points:938
Posted on    June-03-2013 2:48 AM

 Sencha Touch Sencha Touch 
Ratings:


 1 Reply(s)
 964  View(s)
Rate this:
Hi Expert!

I would like to hide clearicon from textbox in sencha control through code. How to do it? Please provide sample code.

Thanks in advance. 



AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-03-2013 9:14 AM

Hi Royce,

You can add this to you global CSS

.x-field-clearable.clear-icon-hidden .x-field-input .x-clear-icon {
  display: none;
}

and then when you want to hide the clear icon of a field you just get your field and do

field.addCls('clear-icon-hidden');

Hope this helpful for you.

Don't want to miss updates? Please click the below button!

Follow MindStick