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
60cc90ec
Kaydet (Commit)
60cc90ec
authored
Nis 08, 1999
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
This demo imported some private code from Matt. Make it cripple along.
üst
6e9dadc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
window-creation-w-location.py
Demo/tkinter/matt/window-creation-w-location.py
+10
-3
No files found.
Demo/tkinter/matt/window-creation-w-location.py
Dosyayı görüntüle @
60cc90ec
from
Tkinter
import
*
import
sys
sys
.
path
.
append
(
"/users/mjc4y/projects/python/tkinter/utils"
)
from
TkinterUtils
import
*
##
sys.path.append("/users/mjc4y/projects/python/tkinter/utils")
##
from TkinterUtils import *
# this shows how to create a new window with a button in it that
# can create new windows
class
QuitButton
(
Button
):
def
__init__
(
self
,
master
,
*
args
,
**
kwargs
):
if
not
kwargs
.
has_key
(
"text"
):
kwargs
[
"text"
]
=
"QUIT"
if
not
kwargs
.
has_key
(
"command"
):
kwargs
[
"command"
]
=
master
.
quit
apply
(
Button
.
__init__
,
(
self
,
master
)
+
args
,
kwargs
)
class
Test
(
Frame
):
def
makeWindow
(
self
,
*
args
):
...
...
@@ -18,7 +25,7 @@ class Test(Frame):
fred
.
label
.
create_line
(
"0"
,
"2i"
,
"2i"
,
"0"
)
fred
.
label
.
pack
()
centerWindow
(
fred
,
self
.
master
)
##
centerWindow(fred, self.master)
def
createWidgets
(
self
):
self
.
QUIT
=
QuitButton
(
self
)
...
...
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