Show and hide one textfield button and only one on focus and blur events

  1. #1

    Show and hide one textfield button and only one on focus and blur events

    Hi,

    I need to find the best approach to resolve this scenario:

    I have a textfield with 2 leftbuttons and 3 rightbuttons.

    I need that only one of the rightbuttons shows when textfield has focus and hides when it lost focus while the rest of the buttons stay always visible.

    Obviusly, the properties showleftbuttonsmode and showrightbuttonsmode don't serves me because them shows or hides all the left or right buttons when the property is marked as focus.

    I tried with the focus and blur listeners of the textfield and it works! the button shows and hides on focus an blur events of the textfield but...when i try to click the button the textfield loses focus and the blur event of it is raised and the button is hidded before i can click on the button.

    so... any idea?

    Thanks a lot for your help.

    Nicodemus
  2. #2
    Hi @Nicodemus,

    I think the best that I can suggest is to investigate how the LeftButtons and RightButtons are implemented in Ext.NET JavaScript sources and try to adjust it for your needs.
  3. #3
    hi Daniil,

    thanks for your help. For the moment I solved it applying a delay to the blur listener. It's not pretty but works.

    Thanks

    Nicodemus

Similar Threads

  1. Replies: 11
    Last Post: Aug 14, 2013, 5:06 PM
  2. [CLOSED] [#31] Show/Hide ComponentColumn Textfield
    By Antonio09 in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 14, 2013, 9:39 AM
  3. Cursor not show after textField.focus()
    By Aod47 in forum 2.x Help
    Replies: 0
    Last Post: Aug 27, 2012, 8:06 AM
  4. [CLOSED] Set Focus to OK button in Ext.Msg.Show
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 13, 2011, 1:12 PM
  5. [CLOSED] Focus TextField if Window Hide=true
    By macap in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 12, 2010, 1:59 PM

Posting Permissions