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
731a986d
Commit
731a986d
authored
Dec 10, 2002
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Tix-8.1.4 from Mike Clarkson (the maintainer)
parent
bca1cbc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
Demo/tix/tixwidgets.py
Demo/tix/tixwidgets.py
+1
-6
Lib/lib-tk/Tix.py
Lib/lib-tk/Tix.py
+22
-3
No files found.
Demo/tix/tixwidgets.py
View file @
731a986d
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# Id: tixwidgets.py,v 1.7 2002/11/14 02:44:08 nnorwitz Exp
# $Id$
#
# tixwidgets.py --
...
...
@@ -545,11 +544,7 @@ def MkSWindow(w):
win
=
Tix
.
ScrolledWindow
(
top
,
scrollbar
=
'auto'
)
global
image1
# This image is not showing up in the Label unless it is set to a
# global variable - no problem under Tcl/Tix. It is being
# garbage collected at the end of this proecedure if not global
image1
=
Tix
.
Image
(
'photo'
,
file
=
file
)
image1
=
win
.
window
.
image_create
(
'photo'
,
file
=
file
)
lbl
=
Tix
.
Label
(
win
.
window
,
image
=
image1
)
lbl
.
pack
(
expand
=
1
,
fill
=
Tix
.
BOTH
)
...
...
Lib/lib-tk/Tix.py
View file @
731a986d
...
...
@@ -256,7 +256,6 @@ class Form:
Tkinter
.
Widget
.
__bases__
=
Tkinter
.
Widget
.
__bases__
+
(
Form
,)
class
TixWidget
(
Tkinter
.
Widget
):
...
...
@@ -377,6 +376,26 @@ class TixWidget(Tkinter.Widget):
names
=
self
.
_subwidget_names
()
for
name
in
names
:
self
.
tk
.
call
(
name
,
'configure'
,
'-'
+
option
,
value
)
# These are missing from Tkinter
def
image_create
(
self
,
imgtype
,
cnf
=
{},
master
=
None
,
**
kw
):
if
not
master
:
master
=
Tkinter
.
_default_root
if
not
master
:
raise
RuntimeError
,
'Too early to create image'
if
kw
and
cnf
:
cnf
=
_cnfmerge
((
cnf
,
kw
))
elif
kw
:
cnf
=
kw
options
=
()
for
k
,
v
in
cnf
.
items
():
if
callable
(
v
):
v
=
self
.
_register
(
v
)
options
=
options
+
(
'-'
+
k
,
v
)
return
master
.
tk
.
call
((
'image'
,
'create'
,
imgtype
,)
+
options
)
def
image_delete
(
self
,
imgname
):
try
:
self
.
tk
.
call
(
'image'
,
'delete'
,
imgname
)
except
TclError
:
# May happen if the root was destroyed
pass
# Subwidgets are child widgets created automatically by mega-widgets.
# In python, we have to create these subwidgets manually to mirror their
...
...
@@ -565,6 +584,8 @@ class ComboBox(TixWidget):
# unavailable when -fancy not specified
pass
# align
def
add_history
(
self
,
str
):
self
.
tk
.
call
(
self
.
_w
,
'addhistory'
,
str
)
...
...
@@ -1247,8 +1268,6 @@ class PopupMenu(TixWidget):
class
ResizeHandle
(
TixWidget
):
"""Internal widget to draw resize handles on Scrolled widgets."""
# FIXME: This is dangerous to expose to be called on its own.
# Perhaps rename ResizeHandle to _ResizeHandle
def
__init__
(
self
,
master
,
cnf
=
{},
**
kw
):
# There seems to be a Tix bug rejecting the configure method
# Let's try making the flags -static
...
...
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