Button Focus Cls

  1. #1

    Button Focus Cls

    Hi!

    I must to set a button with a css class when it has focused, but I don't know what to do it because it doesn't render like an input and if I try something like this, doesnt' works.
    .colorBox:focus{
    background-color: blue;
    }
    This is my button:
    <ext:Button ID="btnColor" runat="server" Cls="colorBox" FieldLabel="Color" 
          Width="40" MenuArrow="false">
              <Menu>
                   <ext:ColorMenu>
                         <Listeners>
                               <Select Handler="Color.setValue(color);" />
                         </Listeners>
                   </ext:ColorMenu>
              </Menu>
    </ext:Button>
    How can I detect focus and change it with JS, or something?
  2. #2
    Hi,

    There are mouseover and mouseout events. Maybe those can help?
    Geoffrey McGill
    Founder & CEO
  3. #3
    No it doesn't may function because in case the user uses Tab to navigate around the controls when button is focused this is moment when i wnat to apply an style.

Similar Threads

  1. Change button look on focus.
    By Rupesh in forum 1.x Help
    Replies: 1
    Last Post: Apr 11, 2012, 10:02 PM
  2. [CLOSED] Set Focus to OK button in Ext.Msg.Show
    By speedstepmem3 in forum 1.x Premium Help
    Replies: 1
    Last Post: Jun 13, 2011, 1:12 PM
  3. [CLOSED] Button focus style
    By jeybonnet in forum 1.x Premium Help
    Replies: 5
    Last Post: Mar 28, 2011, 12:11 PM
  4. [CLOSED] Button Focus
    By SymSure in forum 1.x Premium Help
    Replies: 1
    Last Post: Mar 07, 2011, 1:45 PM
  5. [CLOSED] Setting No button Focus in the message box
    By speedstepmem2 in forum 1.x Premium Help
    Replies: 2
    Last Post: Aug 19, 2010, 8:07 PM

Tags for this Thread

Posting Permissions