#1
  1. Caress me down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Location
    Pennsylvania
    Posts
    289
    Rep Power
    511

    drop down menu in tkinter?


    is there anyway to get a dropdown menu in tkinter? like when you click reply, its one of those menus with font, size, and color. i guess its kinda like a radiobutton. the only options i saw for radiobuttons though were like actual buttons or the little circles when you click on them the little dot goes there.
    so you think you can tell heaven from hell
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    12
    could you explain clearly what you want because at the moment i think it is one where you press right click and then choose something
    Those people who think they know everything are a great annoyance to those of us who do.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    I'm not sure, but do you mean an optionmenu?
    Python Code:
    from Tkinter import *
     
    def print_it(event):
        print var.get()
     
    root = Tk()
    var = StringVar()
    var.set("a")
    OptionMenu(root, var, "a","b","c", command=print_it).pack()
    root.mainloop()


    Regards, mawe

    Comments on this post

    • lw22 agrees : thats it!
  6. #4
  7. Caress me down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Location
    Pennsylvania
    Posts
    289
    Rep Power
    511
    yea mawe's got what i wanted. thanks man
    so you think you can tell heaven from hell

IMN logo majestic logo threadwatch logo seochat tools logo