“GUI Python” Réponses codées

GUI de base tkinter

import tkinter as tk
root = tk.Tk()
root.title("my title")
root.geometry('200x150')
root.configure(background='black')

#	enter widgets here

root.mainloop()
Difficult Dove

GUI Python

import tkinter as tk
#Importing the main module
window = tk.Tk()
window.mainloop()
Outstanding Ox

GUI Python

'''
Different modules exists, from the simpliest to the most complete.
By order I would (subjectively) recommand
- Tkinter | simple, allows to do small board games. Quite good
          | to begin with GUIs
          
- pysimplegui | a little bit more complete, allows to manipulate more
              | easily events, objects and layout
              
- PyQt5 | One the most complete. Using the Qt technology, this allows
        | to build complex and conventionnal GUI. Quite hard to master
        | requires to be at ease with classes, layouts and events
'''
Chall3nger

Comment créer une fenêtre tkinter

import tkinter
master = tkinter.Tk()
master.mainloop()
floating monkey

GUI DEF Python

# main library is tkinter so lets go
import tkinter as tk
root = tk.Tk()
#root.geometry("widthxheight+spcefromleft+spacefromright") lets set h and w
root.geometry("500x200+0+0")
# loop your window 
root.mainloop()
MrprogRammer75

GUI Python

from tkinter import *

root = Tk()

myLabel = Label(root, text = "Any text")

myLabel.pack()

root.mainloop()
Mushy Mink

Réponses similaires à “GUI Python”

Questions similaires à “GUI Python”

Plus de réponses similaires à “GUI Python” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code