tkinter.tix "Control" widget don't work with StringVar?
On 6/1/2019 9:28 PM, jfong at ms4.hinet.net wrote:
> Below is a simplified version of the sample script downloaded from its package.
> When run it, the entry field display '0' instead of 'P&W'.
> PS. I am using Python 3.4.4, Windows 32bit
> 1 from tkinter import tix as Tix
> 3 root = Tix.Tk()
> 5 demo_maker = Tix.StringVar()
> 6 demo_maker.set('P&W')
> 8 c = Tix.Control(root, label='Engine Maker: ',
> 9 variable=demo_maker,
> 10 options='entry.width 10 label.width 20 label.anchor e')
> 11 c.pack(side=Tix.TOP, anchor=Tix.W)
> 13 root.mainloop()
Line numbers interfere with copy and paste.
Control or Spinbox controls a number that can be increased or decreased
with the arrows. You can use a number string like '33' or Intvar or
Note that tix is unmaintained, deprecated, and generally not advised for
new code (or new users).
Terry Jan Reedy