How to limit text and numbers in python/tkinter GUI interface

Discussion in 'Introductions' started by Bigboibremmer, Dec 6, 2019.

  1. Bigboibremmer

    Bigboibremmer

    Joined:
    Dec 6, 2019
    Messages:
    1
    Likes Received:
    0
    Hi

    New to this coding world but love it, however, I am stuck trying to add a stringvalue for a window to limit the number of text in the username field and also limit numbers in the phone number field/window.

    Can anyone help, please?
     
    Bigboibremmer, Dec 6, 2019
    #1
    1. Advertisements

  2. Bigboibremmer

    sunfighter

    Joined:
    Nov 27, 2019
    Messages:
    34
    Likes Received:
    6
    Welcome Bigboibremmer, Hope to see more of you in the future. This is the area where you introduce yourself, not where you ask questions. check the main page for the areas. This question is for the HTML section, but I'll answer.
    The maxlength attribute for the INPUT tag is what you want.
    Ex., <input type="text" maxlength="5">
    Should work the same for type="tel", but you should look at this page https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel It's not an easy thing to use
     
    sunfighter, Dec 7, 2019
    #2
    1. Advertisements

  3. Bigboibremmer

    krypton

    Joined:
    Jan 4, 2020
    Messages:
    8
    Likes Received:
    0
    Location:
    Ilorin, Kwara, Nigeria
    Your topic and content are totally off your topic is about py while the content talks about html plus wrong section
     
    krypton, Jan 4, 2020
    #3
  4. Bigboibremmer

    sunfighter

    Joined:
    Nov 27, 2019
    Messages:
    34
    Likes Received:
    6
    Welcome krypton, hope to see more of you in the future.
    You should address who your speaking to and use punctuation, but I have deciphered your message and believe it's to me.
    I stand by my answer. The problem Bigboibremmer has can be solved, in fact not become a problem, if he/she uses the correct HTML code. No need for python.
    I did tell him that it is the wrong section for a question. She should have posted in the python section; Should I have waited for the OP to re-post or for the mods to move the question?
     
    sunfighter, Jan 4, 2020
    #4
    krypton likes this.
  5. Bigboibremmer

    krypton

    Joined:
    Jan 4, 2020
    Messages:
    8
    Likes Received:
    0
    Location:
    Ilorin, Kwara, Nigeria
    Sorry about the above misunderstanding. And thanks for the warm welcome... My initial comment "Your topic and content are totally off your topic is about py while the content talks about html plus wrong section" was ment for @Bigboibremmer He's topic and the content were off point.. Your answer was correct..
     
    krypton, Jan 5, 2020
    #5
  6. Bigboibremmer

    sunfighter

    Joined:
    Nov 27, 2019
    Messages:
    34
    Likes Received:
    6
    No problem kryton. Like your user name.
     
    sunfighter, Jan 5, 2020
    #6
    krypton likes this.
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.