Answers for "code button trong python"

0

code button trong python

from tkinter import *
from tkinter import messagebox
 
top = Tk()
top.geometry("200x100")
 
def clickRedButton():
    messagebox.showinfo("Hello", "Red Button clicked")
 
def clickBlueButton():
    messagebox.showinfo("Hello", "Blue Button clicked")
 
b1 = Button(top, text = "Red", command = clickRedButton, activeforeground = "red", activebackground = "pink", pady = 10)
b2 = Button(top, text = "Blue", command = clickBlueButton, activeforeground = "blue", activebackground = "pink", pady = 10)
b3 = Button(top, text = "Green", activeforeground = "green", activebackground = "pink", pady = 10)
b4 = Button(top, text = "Yellow", activeforeground = "yellow", activebackground = "pink", pady = 10)
b1.pack(side = LEFT)
b2.pack(side = RIGHT)
b3.pack(side = TOP)
b4.pack(side = BOTTOM)
top.mainloop()
Posted by: Guest on August-31-2021
0

Thẻ <code> trong HTML

<!DOCTYPE html>
<html>
<body>
    <code>SELECT Full_name, City FROM sinh_vien;</code>
    <p>SELECT Full_name, City FROM sinh_vien;</p>
</body>
</html>
Posted by: Doãn Tú on February-12-2022

Python Answers by Framework

Browse Popular Code Answers by Language