Re: [Tkinter-discuss] How to set optionmenu without setting the variable

2009-11-04 Thread david . giesen
Company | 2/83/KRL MC02216 | Rochester, NY 14650 | david.gie...@kodak.com | 1-585-588-0480 Office | www.kodak.com From: Michael Lange To: tkinter-discuss@python.org Date: 11/04/2009 02:30 PM Subject: Re: [Tkinter-discuss] How to set optionmenu without setting the variable Sent by: tkinter-discuss

Re: [Tkinter-discuss] How to set optionmenu without setting the variable

2009-11-04 Thread Michael Lange
Hi, On Wed, 4 Nov 2009 08:23:39 -0500 david.gie...@kodak.com wrote: > I don't believe there is any way to create an OptionMenu without > using a Tk variable. Actually you can: from Tkinter import * root = Tk() om = OptionMenu(root, None, '1', '2') om.pack(padx=100, pady=100) items = ('a', '

[Tkinter-discuss] How to set optionmenu without setting the variable

2009-11-04 Thread david . giesen
I don't believe there is any way to create an OptionMenu without using a Tk variable. However, if all you want to do is to change the value of an already created OptionMenu without using the variable, you can do this: import Tkinter as Tk root = Tk.Tk() var = Tk.StringVar() om = Tk.OptionMenu(r

[Tkinter-discuss] How to set optionmenu without setting the variable

2009-11-04 Thread simha
The conventional way goes this var = Stringvar() var.set('value') But i want to happen without using the variable. Can someone help me out on this? -- View this message in context: http://old.nabble.com/How-to-set-optionmenu-without-setting-the-variable-tp26195310p26195310.html Sent from the Py