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
e7e8d1e1
Commit
e7e8d1e1
authored
Jul 13, 1994
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change remote operation -- display the widget tree in a listbox and
open relevant dialogs on double click
parent
3284abe7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
Demo/tkinter/guido/AttrDialog.py
Demo/tkinter/guido/AttrDialog.py
+22
-4
No files found.
Demo/tkinter/guido/AttrDialog.py
View file @
e7e8d1e1
...
...
@@ -12,7 +12,6 @@
# -- totally static, though different between PackDialog and WidgetDialog
# (but even that could be unified)
from
Tkinter
import
*
class
Option
:
...
...
@@ -406,9 +405,8 @@ def test():
import
sys
root
=
Tk
()
root
.
minsize
(
1
,
1
)
if
sys
.
argv
[
2
:]:
pd
=
RemotePackDialog
(
root
,
sys
.
argv
[
1
],
sys
.
argv
[
2
])
wd
=
RemoteWidgetDialog
(
root
,
sys
.
argv
[
1
],
sys
.
argv
[
2
])
if
sys
.
argv
[
1
:]:
remotetest
(
root
,
sys
.
argv
[
1
])
else
:
frame
=
Frame
(
root
,
{
'name'
:
'frame'
,
Pack
:
{
'expand'
:
1
,
'fill'
:
'both'
},
...
...
@@ -426,4 +424,24 @@ def test():
cwd
=
WidgetDialog
(
canvas
)
root
.
mainloop
()
def
remotetest
(
root
,
app
):
from
listtree
import
listtree
list
=
listtree
(
root
,
app
)
list
.
bind
(
'<Any-Double-1>'
,
opendialogs
)
list
.
app
=
app
# Pass it on to handler
def
opendialogs
(
e
):
import
string
list
=
e
.
widget
sel
=
list
.
curselection
()
for
i
in
sel
:
item
=
list
.
get
(
i
)
widget
=
string
.
split
(
item
)[
0
]
RemoteWidgetDialog
(
list
,
list
.
app
,
widget
)
if
widget
==
'.'
:
continue
try
:
RemotePackDialog
(
list
,
list
.
app
,
widget
)
except
TclError
,
msg
:
print
msg
test
()
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