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
5bd2cd66
Commit
5bd2cd66
authored
Aug 09, 2000
by
Fredrik Lundh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- added xview_moveto, xview_scroll, yview_moveto, yview_scroll
to the Text method (closes Bug #110605)
parent
06d28153
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
Lib/lib-tk/Tkinter.py
Lib/lib-tk/Tkinter.py
+19
-3
No files found.
Lib/lib-tk/Tkinter.py
View file @
5bd2cd66
...
...
@@ -2830,11 +2830,27 @@ class Text(Widget):
if
not
what
:
return
self
.
_getdoubles
(
self
.
tk
.
call
(
self
.
_w
,
'xview'
))
self
.
tk
.
call
((
self
.
_w
,
'xview'
)
+
what
)
def
yview
(
self
,
*
what
):
def
xview_moveto
(
self
,
fraction
):
"""Adjusts the view in the window so that FRACTION of the
total width of the canvas is off-screen to the left."""
self
.
tk
.
call
(
self
.
_w
,
'xview'
,
'moveto'
,
fraction
)
def
xview_scroll
(
self
,
number
,
what
):
"""Shift the x-view according to NUMBER which is measured
in "units" or "pages" (WHAT)."""
self
.
tk
.
call
(
self
.
_w
,
'xview'
,
'scroll'
,
number
,
what
)
def
yview
(
self
,
*
args
):
"""Query and change vertical position of the view."""
if
not
what
:
if
not
args
:
return
self
.
_getdoubles
(
self
.
tk
.
call
(
self
.
_w
,
'yview'
))
self
.
tk
.
call
((
self
.
_w
,
'yview'
)
+
what
)
self
.
tk
.
call
((
self
.
_w
,
'yview'
)
+
args
)
def
yview_moveto
(
self
,
fraction
):
"""Adjusts the view in the window so that FRACTION of the
total height of the canvas is off-screen to the top."""
self
.
tk
.
call
(
self
.
_w
,
'yview'
,
'moveto'
,
fraction
)
def
yview_scroll
(
self
,
number
,
what
):
"""Shift the y-view according to NUMBER which is measured
in "units" or "pages" (WHAT)."""
self
.
tk
.
call
(
self
.
_w
,
'yview'
,
'scroll'
,
number
,
what
)
def
yview_pickplace
(
self
,
*
what
):
"""Obsolete function, use see."""
self
.
tk
.
call
((
self
.
_w
,
'yview'
,
'-pickplace'
)
+
what
)
...
...
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