Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2162237d
Kaydet (Commit)
2162237d
authored
Tem 14, 2016
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #27455: Merge from 3.5
üst
ab078e9e
3093bf16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
tkinter.rst
Doc/library/tkinter.rst
+13
-13
No files found.
Doc/library/tkinter.rst
Dosyayı görüntüle @
2162237d
...
@@ -199,19 +199,19 @@ A Simple Hello World Program
...
@@ -199,19 +199,19 @@ A Simple Hello World Program
class Application(tk.Frame):
class Application(tk.Frame):
def __init__(self, master=None):
def __init__(self, master=None):
tk.Frame.__init__(self,
master)
super().__init__(
master)
self.pack()
self.pack()
self.create
W
idgets()
self.create
_w
idgets()
def create
W
idgets(self):
def create
_w
idgets(self):
self.hi_there = tk.Button(self)
self.hi_there = tk.Button(self)
self.hi_there["text"] = "Hello World\n(click me)"
self.hi_there["text"] = "Hello World\n(click me)"
self.hi_there["command"] = self.say_hi
self.hi_there["command"] = self.say_hi
self.hi_there.pack(side="top")
self.hi_there.pack(side="top")
self.
QUIT
= tk.Button(self, text="QUIT", fg="red",
self.
quit
= tk.Button(self, text="QUIT", fg="red",
command=root.destroy)
command=root.destroy)
self.
QUIT
.pack(side="bottom")
self.
quit
.pack(side="bottom")
def say_hi(self):
def say_hi(self):
print("hi there, everyone!")
print("hi there, everyone!")
...
@@ -536,7 +536,7 @@ For example::
...
@@ -536,7 +536,7 @@ For example::
class
App
(
Frame
):
class
App
(
Frame
):
def
__init__
(
self
,
master
=
None
):
def
__init__
(
self
,
master
=
None
):
Frame
.
__init__
(
self
,
master
)
super
().
__init__
(
master
)
self
.
pack
()
self
.
pack
()
self
.
entrythingy
=
Entry
()
self
.
entrythingy
=
Entry
()
...
@@ -581,13 +581,13 @@ part of the implementation, and not an interface to Tk functionality.
...
@@ -581,13 +581,13 @@ part of the implementation, and not an interface to Tk functionality.
Here
are
some
examples
of
typical
usage
::
Here
are
some
examples
of
typical
usage
::
from
tkinter
import
*
import
tkinter
as
tk
class
App
(
Frame
):
class
App
(
tk
.
Frame
):
def
__init__
(
self
,
master
=
None
):
def
__init__
(
self
,
master
=
None
):
Frame
.
__init__
(
self
,
master
)
super
().
__init__
(
master
)
self
.
pack
()
self
.
pack
()
#
create
the
application
#
create
the
application
myapp
=
App
()
myapp
=
App
()
...
@@ -708,13 +708,13 @@ add
...
@@ -708,13 +708,13 @@ add
For example::
For example::
def turn
R
ed(self, event):
def turn
_r
ed(self, event):
event.widget["
activeforeground
"] = "
red
"
event.widget["
activeforeground
"] = "
red
"
self.button.bind("
<
Enter
>
", self.turn
R
ed)
self.button.bind("
<
Enter
>
", self.turn
_r
ed)
Notice how the widget field of the event is being accessed in the
Notice how the widget field of the event is being accessed in the
:meth:`turnRed
` callback. This field contains the widget that caught the X
``turn_red()`
` callback. This field contains the widget that caught the X
event. The following table lists the other event fields you can access, and how
event. The following table lists the other event fields you can access, and how
they are denoted in Tk, which can be useful when referring to the Tk man pages.
they are denoted in Tk, which can be useful when referring to the Tk man pages.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment