Android Question How do I limit the maxlength on a edit box?

Discussion in 'Android Questions' started by davepamn, Jun 15, 2015.

  1. davepamn

    davepamn Active Member Licensed User

    I am looking for a maxlength property to set on a textbox. Is edit box maxlength set by api or by event down character counting?
    Last edited: Jun 15, 2015
  2. DonManfred

    DonManfred Expert Licensed User

    event down character counting. There is no api. But maybe there is a library which replaces the normal edittext with a custom one. Maybe you can limit the length with this library.
  3. NJDude

    NJDude Expert Licensed User

  4. davepamn

    davepamn Active Member Licensed User

    It seems like an attribute called maxlength should be made available.

    Sub txtGrower_TextChanged (Old As String, New As String)

    If New.Length>4 Then txtGrower.Text=Old

    end sub
  5. lemonisdead

    lemonisdead Well-Known Member Licensed User

    There is a SetLengthFilter in the IME library. Perhaps could it help ?
    thedesolatesoul and Erel like 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