Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
243ac4f4
Commit
243ac4f4
authored
Oct 13, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated listbox methods to Tk 8.0. (Moved some around, added
x/yview_scroll/moveto.)
parent
439c467a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
Lib/lib-tk/Tkinter.py
Lib/lib-tk/Tkinter.py
+20
-12
No files found.
Lib/lib-tk/Tkinter.py
View file @
243ac4f4
...
...
@@ -1397,6 +1397,10 @@ class Listbox(Widget):
self
.
_w
,
'get'
,
first
,
last
))
else
:
return
self
.
tk
.
call
(
self
.
_w
,
'get'
,
first
)
def
index
(
self
,
index
):
i
=
self
.
tk
.
call
(
self
.
_w
,
'index'
,
index
)
if
i
==
'none'
:
return
None
return
getint
(
i
)
def
insert
(
self
,
index
,
*
elements
):
self
.
tk
.
call
((
self
.
_w
,
'insert'
,
index
)
+
elements
)
def
nearest
(
self
,
y
):
...
...
@@ -1408,34 +1412,38 @@ class Listbox(Widget):
self
.
tk
.
call
(
self
.
_w
,
'scan'
,
'dragto'
,
x
,
y
)
def
see
(
self
,
index
):
self
.
tk
.
call
(
self
.
_w
,
'see'
,
index
)
def
index
(
self
,
index
):
i
=
self
.
tk
.
call
(
self
.
_w
,
'index'
,
index
)
if
i
==
'none'
:
return
None
return
getint
(
i
)
def
select_anchor
(
self
,
index
):
def
selection_anchor
(
self
,
index
):
self
.
tk
.
call
(
self
.
_w
,
'selection'
,
'anchor'
,
index
)
select
ion_anchor
=
select
_anchor
def
select_clear
(
self
,
first
,
last
=
None
):
select
_anchor
=
selection
_anchor
def
select
ion
_clear
(
self
,
first
,
last
=
None
):
self
.
tk
.
call
(
self
.
_w
,
'selection'
,
'clear'
,
first
,
last
)
select
ion_clear
=
select
_clear
def
select_includes
(
self
,
index
):
select
_clear
=
selection
_clear
def
select
ion
_includes
(
self
,
index
):
return
self
.
tk
.
getboolean
(
self
.
tk
.
call
(
self
.
_w
,
'selection'
,
'includes'
,
index
))
select
ion_includes
=
select
_includes
def
select_set
(
self
,
first
,
last
=
None
):
select
_includes
=
selection
_includes
def
select
ion
_set
(
self
,
first
,
last
=
None
):
self
.
tk
.
call
(
self
.
_w
,
'selection'
,
'set'
,
first
,
last
)
select
ion_set
=
select
_set
select
_set
=
selection
_set
def
size
(
self
):
return
getint
(
self
.
tk
.
call
(
self
.
_w
,
'size'
))
def
xview
(
self
,
*
what
):
if
not
what
:
return
self
.
_getdoubles
(
self
.
tk
.
call
(
self
.
_w
,
'xview'
))
self
.
tk
.
call
((
self
.
_w
,
'xview'
)
+
what
)
def
xview_moveto
(
self
,
fraction
):
self
.
tk
.
call
(
self
.
_w
,
'xview'
,
'moveto'
,
fraction
)
def
xview_scroll
(
self
,
number
,
what
):
self
.
tk
.
call
(
self
.
_w
,
'xview'
,
'scroll'
,
number
,
what
)
def
yview
(
self
,
*
what
):
if
not
what
:
return
self
.
_getdoubles
(
self
.
tk
.
call
(
self
.
_w
,
'yview'
))
self
.
tk
.
call
((
self
.
_w
,
'yview'
)
+
what
)
def
yview_moveto
(
self
,
fraction
):
self
.
tk
.
call
(
self
.
_w
,
'yview'
,
'moveto'
,
fraction
)
def
yview_scroll
(
self
,
number
,
what
):
self
.
tk
.
call
(
self
.
_w
,
'yview'
,
'scroll'
,
number
,
what
)
class
Menu
(
Widget
):
def
__init__
(
self
,
master
=
None
,
cnf
=
{},
**
kw
):
...
...
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