How to Create a COMBOBOX Using Python!!

preview_player
Показать описание
In this tutorial I will be showing you how to create a COMBOBOX using Python. This tutorial provides a step-by-step walk-through made to help you increase your knowledge and understanding of Python.

Order of Video:
00:00 - 01:28 = Introduction and Explanation
01:28 -07:41 = Writing the Code
07:41 - END = Conclusion

Subscribe to my YouTube channel "AnalystRising" for more amazing stuff!!

PATREON:
If you liked the tutorial then please feel free to make a donation on Patreon.
Just copy and paste the link below to go directly to my page.

The audio sometimes goes a little funny however it is still clear to hear and understand
Apologies for any inconvenience caused by this

Please do subscribe and share the video to someone who you feel may benefit from this tutorial or any other tutorial on my channel!!

PLEASE NOTE:
My Python Shell may be different to yours and may be set-up in a different way.  Doing various things such as installing packages/modules may be different for you.

#analystrising
#pythontutorial
#combobox
Рекомендации по теме
Комментарии
Автор

SOURCE CODE BELOW!!!


import tkinter as tkr
import tkinter.ttk as tkrttk


"""CREATE MAIN PAGE"""
screen = tkr.Tk()
screen.geometry("200x100")
screen.title("Combobox")

v = tkr.StringVar()

"""CREATE COMBOBOX"""
Combobox1 = tkrttk.Combobox(screen, textvariable=v)
Combobox1["values"] = ["Apple", "Banana", "Strawberry", "Grape"]
Combobox1.current(0) #sets the index


"""GET COMBOBOX BOX VALUE"""
#Using the Combobox value
label1 = tkr.Label(screen, textvariable = v)

"""LAYING OUT WIDGETS"""
Combobox1.grid(row=0, column=0)
label1.grid(row=1, column=0)

"""ACTIVATE"""
tkr.mainloop()

AnalystRising