Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Use one function for the "ComboboxSelected", to read multiple combobox

import tkinter as tk
from tkinter import ttk

# --- functions ---

def newselection(event, other):
    print('selected:', event.widget.get())
    print('other:', other)

# --- main ---

root = tk.Tk()

cb1 = ttk.Combobox(root, values=('a', 'c', 'g', 't'))
cb1.pack()
cb1.bind("<<ComboboxSelected>>", lambda event:newselection(event, "Hello"))

cb2 = ttk.Combobox(root, values=('X', 'Y', 'XX', 'XY'))
cb2.pack()
cb2.bind("<<ComboboxSelected>>", lambda event:newselection(event, "World"))

root.mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: download Twitter Images with BeautifulSoup 
Python :: pygame borders on window 
Python :: list x[:-1] 
Python :: python how do I count the time that it takes for the sorting to execute in seconds? [closed] 
Python :: opencv2.3 
Python :: genisim 4.0 words 
Python :: get distance between points in 1 array pythoin 
Python :: how to aggregate and add new column 
Python :: lmplot color] 
Python :: load SQLite db into memory 
Python :: ignore exception decorator 
Python :: how to click button and download a file using robot frame work or selenium, it not contains link 
Python :: cuenta atras segundero python 
Python :: python QFileDialog select files 
Python :: Like strings (and all other built-in sequence type), lists can be indexed and sliced: 
Python :: import all csv as individual dataframes python 
Python :: ring print part of the content of a binary file 
Python :: ring check if a Ring function is defined or not 
Python :: how to split from a specific charecter tfrm the end of string 
Python :: Window freezes after clicking of button in python GTK3 
Python :: django recapcha 
Python :: how to add illegal characters to paths python 
Python :: plt.axes muktiple plots 
Python :: modwt python github code 
Python :: plot true values vs actucal vales 
Python :: sklearn isolationforest 
Python :: 1007 solution python 
Python :: python http handler iis 
Python :: apa itu duck typing python 
Python :: 2 liste to a dictionary 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =