combobox

Combobox not displaying (Tkinter)

Combobox not displaying (Tkinter) Question: Im trying to use a combobox in my program. To simplify my program, my main window uses an image as a background, and my buttons and entry boxes I wont include since they arent relavent. The code for my main window is: from tkinter.ttk import Combobox from tkinter.ttk import * …

Total answers: 1

How to add different background colors to different selection options in ttk.Combobox?

How to add different background colors to different selection options in ttk.Combobox? Question: I want to add different colors to different selections in Combobox. I found questions about changing the overall background color, but not per entry. I’m attaching some examples below. Asked By: Mike Azatov || Source Answers: The Ttk Combobox does not supports …

Total answers: 1

Python tkinter/ttk Combobox- I'm wanting each option in a Python ttk-combobox to display 1 list but have values from a 2nd list

Python tkinter/ttk Combobox- I'm wanting each option in a Python ttk-combobox to display 1 list but have values from a 2nd list Question: database_list = ["Movies", "Movies", "Games", "Music", "Games", "Music"] id_list = [0,1,2,3,4,5] my_combobox = ttk.Combobox(root, **values=database_list**) my_combobox.grid(row=1, column=1) I want the user to see "Movies", "Movies", "Games", "Music", "Games", "Music" shown in the …

Total answers: 2

Adding values into Combobox tkinter from another function

Adding values into Combobox tkinter from another function Question: I want to construct a combobox whose items are the ip addressess in local network. NOTE:I am linux user ` from scapy.all import * import sys import os from tkinter import * from tkinter import ttk import subprocess class Uygulama(object): new_list1=None def __init__(self): self.araclar() #contain widgets …

Total answers: 1

Gettting element from combobox problem in tkinter

Gettting element from combobox problem in tkinter Question: I am trying to get the selected element from combobox in tkinter. I will use this selected element in my code. There are some asked questions and posts in internet but they did not help me. So, I am sharing the related part of my code : …

Total answers: 2

TypeError: action() takes 1 positional argument but 2 were given

TypeError: action() takes 1 positional argument but 2 were given Question: I used to work with this way of coding and it worked fine, but after going back to it a few weeks later, it does not anymore. I simplidied my code so it is easy to type here. import tkinter as tk from tkinter …

Total answers: 2

Nested function doesn't read Combobox values from outer function when changed (tkinter)

Nested function doesn't read Combobox values from outer function when changed (tkinter) Question: In the following code, I’m facing the problem that after I choose a text from the second menu then change the color in the first menu, the background changes but the label background doesn’t change, how can I fix this? For example, …

Total answers: 1

Combo box value list not updating

Combo box value list not updating Question: I made an application which includes a graphics file Part1.ui and a python file Part1.ui includes 2 combo boxes which are named cmb_District and cmb_Tehsil I Added a list in cmb_District and i want to make comparison in cmb_District.currentText() If currentText() is Lahore then i want to add …

Total answers: 1

PySimpleGUI Combo: Bind key/value pair array or get selected index?

PySimpleGUI Combo: Bind key/value pair array or get selected index? Question: I’m really astounded that there doesn’t seem to be a way to bind a dictionary or key/value pair array to a simple dropdownlist that the Combo element is supposed to cover. The contents of a given Combo in my app is fetched from the …

Total answers: 1