tkinter textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nazish zehra
    New Member
    • Dec 2011
    • 31

    tkinter textbox

    i am using textbox (textbox1) for input in my program and storing it in string as:
    Text=textbox1.g et(0.0,END)
    and then validating the Text but problem is that it is also taking spaces as input in Text but i want Text only to store string not spaces.is there any form of get() function to take only string not spaces upto END becoz my program then is not validating the correct string
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    You should use string methods to eliminate any unwanted spaces in the assignment. Example that eliminates leading and trailing spaces:
    Text=textbox1.g et(0.0,END).str ip()

    Comment

    • nazish zehra
      New Member
      • Dec 2011
      • 31

      #3
      thanks alot it worked :)

      Comment

      Working...