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
460b6bb1
Kaydet (Commit)
460b6bb1
authored
Tem 06, 1994
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Totally changed, now it is actually derived from Text
(This breaks something in MimeViewer.py, don't know what yet)
üst
72cb020b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
62 deletions
+40
-62
ScrolledText.py
Lib/lib-tk/ScrolledText.py
+20
-31
ScrolledText.py
Lib/tkinter/ScrolledText.py
+20
-31
No files found.
Lib/lib-tk/ScrolledText.py
Dosyayı görüntüle @
460b6bb1
...
...
@@ -7,40 +7,29 @@
# Configuration options are passed to the Text widget.
# A Frame widget is inserted between the master and the text, to hold
# the Scrollbar widget.
# Most methods calls are
passed to the Text widget; the pack command
#
is
redirected to the Frame widget however.
# Most methods calls are
inherited from the Text widget; Pack methods
#
are
redirected to the Frame widget however.
from
Tkinter
import
*
from
Tkinter
import
_cnfmerge
class
ScrolledText
(
Pack
,
Place
):
class
ScrolledText
(
Text
):
def
__init__
(
self
,
master
=
None
,
cnf
=
{}):
cnf
=
_cnfmerge
(
cnf
)
fcnf
=
{}
self
.
frame
=
Frame
(
master
,
{})
if
cnf
.
has_key
(
Pack
):
self
.
frame
.
pack
(
cnf
[
Pack
])
del
cnf
[
Pack
]
self
.
vbar
=
Scrollbar
(
self
.
frame
,
{})
self
.
vbar
.
pack
({
'side'
:
'right'
,
'fill'
:
'y'
})
for
k
in
cnf
.
keys
():
if
type
(
k
)
==
ClassType
:
fcnf
[
k
]
=
cnf
[
k
]
del
cnf
[
k
]
self
.
frame
=
Frame
(
master
,
fcnf
)
self
.
vbar
=
Scrollbar
(
self
.
frame
,
{
Pack
:
{
'side'
:
'right'
,
'fill'
:
'y'
}})
cnf
[
Pack
]
=
{
'side'
:
'left'
,
'fill'
:
'both'
,
'expand'
:
'yes'
}
self
.
text
=
Text
(
self
.
frame
,
cnf
)
self
.
text
[
'yscrollcommand'
]
=
(
self
.
vbar
,
'set'
)
self
.
vbar
[
'command'
]
=
(
self
.
text
,
'yview'
)
self
.
insert
=
self
.
text
.
insert
# XXX should do all Text methods...
self
.
pack
=
self
.
frame
.
pack
self
.
bind
=
self
.
text
.
bind
self
.
forget
=
self
.
frame
.
forget
self
.
delete
=
self
.
text
.
delete
self
.
insert
=
self
.
text
.
insert
self
.
index
=
self
.
text
.
index
self
.
get
=
self
.
text
.
get
self
.
mark_set
=
self
.
text
.
mark_set
self
.
tag_add
=
self
.
text
.
tag_add
self
.
tag_delete
=
self
.
text
.
tag_delete
self
.
tag_remove
=
self
.
text
.
tag_remove
self
.
tag_config
=
self
.
text
.
tag_config
self
.
yview
=
self
.
text
.
yview
self
.
yview_pickplace
=
self
.
text
.
yview_pickplace
self
.
tk
=
master
.
tk
def
__str__
(
self
):
return
str
(
self
.
frame
)
Text
.
__init__
(
self
,
self
.
frame
,
cnf
)
self
[
'yscrollcommand'
]
=
(
self
.
vbar
,
'set'
)
self
.
vbar
[
'command'
]
=
(
self
,
'yview'
)
# Copy Pack methods of self.frame -- hack!
for
m
in
Pack
.
__dict__
.
keys
():
if
m
[
0
]
!=
'_'
and
m
!=
'config'
:
setattr
(
self
,
m
,
getattr
(
self
.
frame
,
m
))
Lib/tkinter/ScrolledText.py
Dosyayı görüntüle @
460b6bb1
...
...
@@ -7,40 +7,29 @@
# Configuration options are passed to the Text widget.
# A Frame widget is inserted between the master and the text, to hold
# the Scrollbar widget.
# Most methods calls are
passed to the Text widget; the pack command
#
is
redirected to the Frame widget however.
# Most methods calls are
inherited from the Text widget; Pack methods
#
are
redirected to the Frame widget however.
from
Tkinter
import
*
from
Tkinter
import
_cnfmerge
class
ScrolledText
(
Pack
,
Place
):
class
ScrolledText
(
Text
):
def
__init__
(
self
,
master
=
None
,
cnf
=
{}):
cnf
=
_cnfmerge
(
cnf
)
fcnf
=
{}
self
.
frame
=
Frame
(
master
,
{})
if
cnf
.
has_key
(
Pack
):
self
.
frame
.
pack
(
cnf
[
Pack
])
del
cnf
[
Pack
]
self
.
vbar
=
Scrollbar
(
self
.
frame
,
{})
self
.
vbar
.
pack
({
'side'
:
'right'
,
'fill'
:
'y'
})
for
k
in
cnf
.
keys
():
if
type
(
k
)
==
ClassType
:
fcnf
[
k
]
=
cnf
[
k
]
del
cnf
[
k
]
self
.
frame
=
Frame
(
master
,
fcnf
)
self
.
vbar
=
Scrollbar
(
self
.
frame
,
{
Pack
:
{
'side'
:
'right'
,
'fill'
:
'y'
}})
cnf
[
Pack
]
=
{
'side'
:
'left'
,
'fill'
:
'both'
,
'expand'
:
'yes'
}
self
.
text
=
Text
(
self
.
frame
,
cnf
)
self
.
text
[
'yscrollcommand'
]
=
(
self
.
vbar
,
'set'
)
self
.
vbar
[
'command'
]
=
(
self
.
text
,
'yview'
)
self
.
insert
=
self
.
text
.
insert
# XXX should do all Text methods...
self
.
pack
=
self
.
frame
.
pack
self
.
bind
=
self
.
text
.
bind
self
.
forget
=
self
.
frame
.
forget
self
.
delete
=
self
.
text
.
delete
self
.
insert
=
self
.
text
.
insert
self
.
index
=
self
.
text
.
index
self
.
get
=
self
.
text
.
get
self
.
mark_set
=
self
.
text
.
mark_set
self
.
tag_add
=
self
.
text
.
tag_add
self
.
tag_delete
=
self
.
text
.
tag_delete
self
.
tag_remove
=
self
.
text
.
tag_remove
self
.
tag_config
=
self
.
text
.
tag_config
self
.
yview
=
self
.
text
.
yview
self
.
yview_pickplace
=
self
.
text
.
yview_pickplace
self
.
tk
=
master
.
tk
def
__str__
(
self
):
return
str
(
self
.
frame
)
Text
.
__init__
(
self
,
self
.
frame
,
cnf
)
self
[
'yscrollcommand'
]
=
(
self
.
vbar
,
'set'
)
self
.
vbar
[
'command'
]
=
(
self
,
'yview'
)
# Copy Pack methods of self.frame -- hack!
for
m
in
Pack
.
__dict__
.
keys
():
if
m
[
0
]
!=
'_'
and
m
!=
'config'
:
setattr
(
self
,
m
,
getattr
(
self
.
frame
,
m
))
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