-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
100 lines (73 loc) · 1.91 KB
/
example.py
File metadata and controls
100 lines (73 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
from tkinter import *
pencere = Tk()
pencere.title("Bahar")
pencere.geometry("260x300+500+100")
#ılk en sonra dikey boyutu yazılı+soldan sağa+ yukardan asaği
#pencere.resizable(FALSE,FALSE)
"""Bu pencereyi hareket ettirmemeyi saglar."""
pencere.minsize(100,100)
#Kücülebilecegi En kucuk deger
#pencere.maxsize(900,700)
#Buyuyebilecegi en büyük deger
#pencere.state("iconic")
#Sadece simgeye bastımızda cıkar
#pencere.state("zoomed")
#tam ekran yapar.
pencere.state("normal")
#normal olur.
#pencere.wm_attributes("-alpha", 0.9)
"""pencere saydamlastırma 0'a ne kadar
yaklasırsa o kadar saydamlasır.
"""
yazı = Label(text = "Bhr",
fg = "green",
bg = "yellow",
font = ("Open Sans", "18","italic"),
#width = 30,
#height = 5,
padx = 90,
pady = 30,
#justify = "center"
#anchor = "s"
)
#font parametresi icin 2.yer yazı boyutu
#font parametresi icn en son yere bunlar gelebilir.
"""
"bold" = Kalın yazı
"italic" = Yana yatık yazı
"normal" = Normal yazı
"underline" = Altı çizgili yazı
"overstrike" = Ortası çizik yazı"""
#anchor yazı konumunu belırler
"""
justify = alacağı değerler "left","right","center"
anchor = "n" (Yukarı)
anchor = "s" (Aşağı)
anchor = "e" (Sağ)
anchor = "w" (Sol)
anchor = "ne" (Yukarı - Sağ)
anchor = "nw" (Yukarı - Sol)
anchor = "se" (Aşağı - Sağ)
anchor = "sw" (Aşağı -Sol)
anchor = "center" (Orta
"""
yazı.pack()
#pencereye label(etiket) olusturma
#Buton olusturma
def değistir():
etiket ["text"] = "Merhaba Dünya"
etiket ["bg"] = "green"
def kapat():
print("HEY!! ÇIKIYORSUN...")
quit()
etiket = Label(text = "Hello World", bg = "blue")
etiket.pack()
buton = Button(text = "Çevir",
command = değistir)
buton.pack()
#pasif buton
"""buton2 = Button(text ="pasif",state="disabled")
buton2.pack()"""
buton2 = Button(text ="Kapat",command = kapat)
buton2.pack()
mainloop()