1. #1
    Sencha User
    Join Date
    Jun 2013
    Location
    Berkeley CA
    Posts
    9
    Vote Rating
    0
    Stevko (UCB) is on a distinguished road

      0  

    Default how to set focus to menu item wrapped textfield on menu.show?

    how to set focus to menu item wrapped textfield on menu.show?


    Version(s) of Ext GWT
    3.0.4

    Description

    I have a TextField wrapped in a AdapterMenuItem in Menu attached to a SplitButton.

    Code:
                    final Menu menu = new Menu()
                    menu.setFocusOnShow(true);
    
    		textField = new TextField();
                    textField.setSelectOnFocus(true);
    
    		final AdapterMenuItem textMenuItem = new AdapterMenuItem(textField);
    		textMenuItem.setCanActivate(true);
    
    		menu.add(textMenuItem);
    		menu.setActiveItem(textMenuItem, true);
    When the menu is shown, I would like the focus to be in the text entry field.

    I've tried various api like menu.setActiveMenuItem(textMenuItem) and textMenuItem.setCanActivate(true) although I'm not sure these are relevant methods.


    How do I make the text field hold the focus when the menu is shown?

  2. #2
    Sencha User
    Join Date
    Jun 2013
    Location
    Berkeley CA
    Posts
    9
    Vote Rating
    0
    Stevko (UCB) is on a distinguished road

      0  

    Default


    I have a similar issue with the focus control of a menu item containing a NumberField
    Code:
    lessMenuItem = new MenuItem();        
    lessMenuItem.setHideOnClick(false);        
    lessMenuItem.setIcon(CommonIcons.get().lessThan());                
    NumberField field = new NumberField(new NumberPropertyEditor.DoublePropertyEditor())            
    lessMenuItem.setWidget( field );

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi