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
bf1eb637
Kaydet (Commit)
bf1eb637
authored
May 29, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#2906: accept lists for options, and some cosmetic fixes in Tkinter.
üst
bb87e2b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
__init__.py
Lib/tkinter/__init__.py
+19
-15
No files found.
Lib/tkinter/__init__.py
Dosyayı görüntüle @
bf1eb637
...
...
@@ -1051,6 +1051,12 @@ class Misc:
if
k
[
-
1
]
==
'_'
:
k
=
k
[:
-
1
]
if
hasattr
(
v
,
'__call__'
):
v
=
self
.
_register
(
v
)
elif
isinstance
(
v
,
(
tuple
,
list
)):
for
item
in
v
:
if
not
isinstance
(
item
,
(
basestring
,
int
)):
break
else
:
v
=
' '
.
join
(
map
(
str
,
v
))
res
=
res
+
(
'-'
+
k
,
v
)
return
res
def
nametowidget
(
self
,
name
):
...
...
@@ -1090,7 +1096,6 @@ class Misc:
if
self
.
_tclCommands
is
None
:
self
.
_tclCommands
=
[]
self
.
_tclCommands
.
append
(
name
)
#print '+ Tkinter created command', name
return
name
register
=
_register
def
_root
(
self
):
...
...
@@ -1740,10 +1745,11 @@ class Pack:
after=widget - pack it after you have packed widget
anchor=NSEW (or subset) - position widget according to
given direction
before=widget - pack it before you will pack widget
before=widget - pack it before you will pack widget
expand=bool - expand widget if parent size grows
fill=NONE or X or Y or BOTH - fill widget if widget grows
in=master - use master to contain this widget
in_=master - see 'in' option description
ipadx=amount - add internal padding in x direction
ipady=amount - add internal padding in y direction
padx=amount - add padding in x direction
...
...
@@ -1781,29 +1787,26 @@ class Place:
Base class to use the methods place_* in every widget."""
def
place_configure
(
self
,
cnf
=
{},
**
kw
):
"""Place a widget in the parent widget. Use as options:
in=master - master relative to which the widget is placed.
in=master - master relative to which the widget is placed
in_=master - see 'in' option description
x=amount - locate anchor of this widget at position x of master
y=amount - locate anchor of this widget at position y of master
relx=amount - locate anchor of this widget between 0.0 and 1.0
relative to width of master (1.0 is right edge)
rely=amount - locate anchor of this widget between 0.0 and 1.0
rely=amount - locate anchor of this widget between 0.0 and 1.0
relative to height of master (1.0 is bottom edge)
anchor=NSEW (or subset) - position anchor according to given direction
anchor=NSEW (or subset) - position anchor according to given direction
width=amount - width of this widget in pixel
height=amount - height of this widget in pixel
relwidth=amount - width of this widget between 0.0 and 1.0
relative to width of master (1.0 is the same width
as the master)
relheight=amount - height of this widget between 0.0 and 1.0
as the master)
relheight=amount - height of this widget between 0.0 and 1.0
relative to height of master (1.0 is the same
height as the master)
bordermode="inside" or "outside" - whether to take border width of master widget
into account
"""
for
k
in
[
'in_'
]:
if
k
in
kw
:
kw
[
k
[:
-
1
]]
=
kw
[
k
]
del
kw
[
k
]
height as the master)
bordermode="inside" or "outside" - whether to take border width of
master widget into account
"""
self
.
tk
.
call
(
(
'place'
,
'configure'
,
self
.
_w
)
+
self
.
_options
(
cnf
,
kw
))
...
...
@@ -1838,6 +1841,7 @@ class Grid:
column=number - use cell identified with given column (starting with 0)
columnspan=number - this widget will span several columns
in=master - use master to contain this widget
in_=master - see 'in' option description
ipadx=amount - add internal padding in x direction
ipady=amount - add internal padding in y direction
padx=amount - add padding in x direction
...
...
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