Announcement

Collapse
No announcement yet.

How do i set focus on a Button after input text?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do i set focus on a Button after input text?

    Hi pls. help.
    I want to set focus on a button just after i complete my login details such as name and password in input, just after that the button should just set focus so that user can just press the enter key to continue, instead of using the mouse to click on the button to login.

    i have checked the forum but the solutions could not solve this issue.

    Kaase.

  • #2
    Try to paste this code in your edit controls On Char event.

    Code:
    txt = Input.GetText("Input1");
    
    if (txt == "Password") then
    Page.SetFocus("xButton1");
    end
    Plugins:

    Bitmap (113 KB)

    ComboBoxEx (141 KB)

    Comment


    • #3
      Hi Ruth I have tried it but did not work, if u can figor it out I will appreciate.

      Thanks

      Comment


      • #4
        The code Ruth posted will set the focus to the button after each keypress, which is probably not what you need - but you asked for code to change the focus.

        What you actually need appears to be something like this, in the On Key even script instead (removing the other code):
        Code:
        if (e_Key == 13) then
            Page.ClickObject("TheButtonToClick");
        end
        This won't change the focus, but will click the button when you press Enter in the Input object.

        Ulrich

        Comment

        Working...
        X