User Profile

Collapse

Profile Sidebar

Collapse
Tsunexus
Tsunexus
Last Activity: Apr 25 '10, 11:05 PM
Joined: Apr 25 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Tsunexus
    replied to Tkinter button command question
    Works like a charm, thanks a million... My biggest problem was that i understood exactly why it wasn't working, but would never have thought to take your approach.
    See more | Go to post

    Leave a comment:


  • Tsunexus
    started a topic Tkinter button command question

    Tkinter button command question

    What i am doing is creating a set of buttons from strings read from a file. When clicked, the button then adds the string to a listbox using a function i made called "additem(item)" .

    code similar to this:
    Code:
    #global variables
    root = Tk()
    myframe = Frame(...)
    mylist = Listbox(....)
    myfile = open("myfile.txt", "r")
    
    def additem(item):
         mylist.insert(END,
    ...
    See more | Go to post
    Last edited by Tsunexus; Apr 25 '10, 07:48 PM. Reason: forgot something
No activity results to display
Show More
Working...