“GUI di Python” Kode Jawaban

cara membuat jendela tkinter

#Creating Tkinter Window In Python:

from tkinter import *

new_window = Tk() #Create a window ; spaces should be denoted with underscores ; every window should have a different name
new_window.title("My Python Project") #Name of screen ; name should be the one which you already declared (new_window)
new_window.geometry("200x150") #Resizes the default window size
new_window.configure(bg = "red") #Gives color to the background

new_window.mainloop() #Shows the window on the screen
CodePro#1

GUI TKINTER DASAR

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

Python Gui

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

Python Gui

'''
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

cara membuat jendela tkinter

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

GUI di Python

import pygame
pygame.init()
W, H = 900, 500
WIN = pygame.display.set_mode((W, H))
run = True
while run:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      run = False
pygame.quit()
Nice Nightingale

Jawaban yang mirip dengan “GUI di Python”

Pertanyaan yang mirip dengan “GUI di Python”

Lebih banyak jawaban terkait untuk “GUI di Python” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya