ComboBox in Python 2.7.x

0

I'm starting in python and well I'm trying to put a ComboBox with ttk but I have a problem and I try to use the methods of the ComboBox but I generate error, according to no such method.

I have been reading the documentation, and I have read several pages where they post code if not equal similar, try to even install python 3.5.6 and even the problem persists, so I do not know why.

First of all thanks, maybe the mistake is something silly but I'm starting with the language.

import Tkinter as tk
import ttk

master = tk.Tk()

values=["Opcion 1","Opcion 2","Opcion 3"]
combo=ttk.Combobox(master, values=values).pack()
combo.current(2)

master.mainloop()

    
asked by ambrocio isaias laureano castr 14.10.2018 в 03:34
source

0 answers