Android Question Question on IME.SetFilterLength

Discussion in 'Android Questions' started by jzfla01, Jun 18, 2015.

  1. jzfla01

    jzfla01 Member Licensed User

    In the SUB Globals, I have this:

    DIM IME as IME

    In the Activity_Create module:

    Activity.LoadLayout ("DBase")
    IME.SetLengthFilter (txtDept, 2) 'Set Max Length for txtDept = 2
    IME.SetLengthFilter (txtDept, 25) 'Set Max Length for txtDeptName = 25

    DBASE is a Designer created page with a text box named txtDept and txtDeptName on it.
    Both txtDept and txtDeptName are defined as INPUT TYPE = TEXT

    When the application runs, I would expect that I could only enter up to 2 characters in the field txtDept, but on the screen, I can enter as many as I like to enter.

    I am testing using the emulator.

    Should the IME.SetLengthFilter be placed in a different area of code to allow the user to only enter two characters?

    Thank you very much!

  2. jzfla01

    jzfla01 Member Licensed User

    Something must have gotten goofed up with the layout. I opened the IME example and it worked there. I deleted the two EDITTEXT boxes in the layout designer and recreated them, now they work as expected.
    lemonisdead likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice