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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar