1. #1
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default FormPanel default key action

    FormPanel default key action


    Hi,

    How would you enable default "enter" key action on a FormPanel.

    Previosuly (0.52) I used the following code which work on GWT textfields etc...

    Code:
            KeyboardListenerAdapter kla = new KeyboardListenerAdapter()
            {
            	public void onKeyPress(Widget sender, char key, int mods)
            	{
            		if (KeyboardListener.KEY_ENTER == key) 
            			{
            		    loginBtn.fireEvent(Events.Select);
            			System.out.println("click");
            			}
            	}
            	
            };
            userTxtFld.addKeyboardListener(kla);
            pwdTxtFld.addKeyboardListener(kla);
    ... now I can't find key listening events when using GXT fields to get the key codes from BaseEvent ??

  2. #2
    Ext User
    Join Date
    Apr 2008
    Posts
    11
    Vote Rating
    0
    catchbox is on a distinguished road

      0  

    Default Use KeyNav

    Use KeyNav


    You can use KeyNav...see in code snippet.

    Code:
        new KeyNav(formLogin){
         @Override
          public void onEnter(ComponentEvent ce){
            Info.display("Enter", "formLogin pressed");
          }
        };

  3. #3
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    Thankyou very much - really need to look through the docs more to find new things !!

Thread Participants: 1