[Python-checkins] CVS: python/dist/src/Demo/tix INSTALL.txt,1.1,1.2 README.txt,1.1,1.2 tixwidgets.py,1.2,1.3
Martin v. L?wis
loewis@users.sourceforge.net
Sun, 11 Nov 2001 06:07:39 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject/template-carbon template.prj.xml,1.2,1.3
- Next message: [Python-checkins] CVS: python/dist/src/Demo/tix/samples DirList.py,NONE,1.1 DirTree.py,NONE,1.1 SHList1.py,1.1,1.2 SHList2.py,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Demo/tix
In directory usw-pr-cvs1:/tmp/cvs-serv28070
Modified Files:
INSTALL.txt README.txt tixwidgets.py
Log Message:
Patch #473002: Update Demo/tix tixwidgets.py et al.
Index: INSTALL.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/tix/INSTALL.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** INSTALL.txt 2001/03/21 07:42:07 1.1
--- INSTALL.txt 2001/11/11 14:07:37 1.2
***************
*** 1,24 ****
$Id$
! Installing PyTix
----------------
! 0) To use PyTix, you need Tcl/Tk (V8.2+), Tix (V8.1+) and Python (V2.1+).
! PyTix has been written and tested on a Intel Pentium running RH Linux 5.2
and Mandrake Linux 7.0 and Windows with the above mentioned packages.
Older versions, e.g. Tix 4.1 and Tk 8.0, might also work.
! There is nothing OS-specific in PyTix itself so it should work on
any machine with Tix and Python installed. You can get Tcl and Tk
from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
! 1) Build and install Tcl/Tk 8.2 or 8.3. Build and install Tix 8.1 or better.
Ensure that Tix is properly installed by running tixwish and executing
the demo programs. Under Unix, use the --enable-shared configure option
! for all three. We recommend tcl8.2.3 for this release of PyTix.
! 2) Modify Modules/Setup.dist and setup.py to change the version of the
! tix library from tix4.1.8.0 to tix8.1.8.2
These modified files can be used for Tkinter with or without Tix.
--- 1,32 ----
$Id$
! Installing Tix.py
----------------
! 0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.1.1) and Python (V2.1.1).
! Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2
and Mandrake Linux 7.0 and Windows with the above mentioned packages.
Older versions, e.g. Tix 4.1 and Tk 8.0, might also work.
! There is nothing OS-specific in Tix.py itself so it should work on
any machine with Tix and Python installed. You can get Tcl and Tk
from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
! 1) Build and install Tcl/Tk 8.3. Build and install Tix 8.1.
Ensure that Tix is properly installed by running tixwish and executing
the demo programs. Under Unix, use the --enable-shared configure option
! for all three. We recommend tcl8.3.3 for this release of Tix.py.
! 2a) If you have a distribution like ActiveState with a tcl subdirectory
! of $PYTHONHOME, which contains the directories tcl8.3 and tk8.3,
! make a directory tix8.1 as well. Recursively copy the files from
! <tix>/library to $PYTHONHOME/lib/tix8.1, and copy the dynamic library
! (tix8183.dll or libtix8.1.8.3.so) to the same place as the tcl dynamic
! libraries ($PYTHONHOME/Dlls or lib/python-2.1/lib-dynload). In this
! case you are all installed, and you can skip to the end.
!
! 2b) Modify Modules/Setup.dist and setup.py to change the version of the
! tix library from tix4.1.8.0 to tix8.1.8.3
These modified files can be used for Tkinter with or without Tix.
***************
*** 45,51 ****
# -DWITH_TOGL togl.c \
# *** Uncomment and edit for Tix extension only:
! -DWITH_TIX -ltix8.1.8.2 \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
! -ltk8.2 -ltcl8.2 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-L/usr/X11R6/lib \
--- 53,59 ----
# -DWITH_TOGL togl.c \
# *** Uncomment and edit for Tix extension only:
! -DWITH_TIX -ltix8.1.8.3 \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
! -ltk8.3 -ltcl8.3 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-L/usr/X11R6/lib \
***************
*** 70,75 ****
TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables. Try this:
! env TCL_LIBRARY=/usr/local/lib/tcl8.2 \
! TK_LIBRARY=/usr/local/lib/tk8.2 \
TIX_LIBRARY=/usr/local/lib/tix8.1 \
/usr/local/bin/python Demo/tix/tixwidgets.py
--- 78,83 ----
TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables. Try this:
! env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
! TK_LIBRARY=/usr/local/lib/tk8.3 \
TIX_LIBRARY=/usr/local/lib/tix8.1 \
/usr/local/bin/python Demo/tix/tixwidgets.py
Index: README.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/tix/README.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** README.txt 2001/03/21 07:42:07 1.1
--- README.txt 2001/11/11 14:07:37 1.2
***************
*** 1,6 ****
! About PyTix
-----------
! PyTix is based on an idea of Jean-Marc Lugrin (lugrin@ms.com) who wrote
pytix (another Python-Tix marriage). Tix widgets are an attractive and
useful extension to Tk. See http://tix.sourceforge.net
--- 1,6 ----
! About Tix.py
-----------
! Tix.py is based on an idea of Jean-Marc Lugrin (lugrin@ms.com) who wrote
pytix (another Python-Tix marriage). Tix widgets are an attractive and
useful extension to Tk. See http://tix.sourceforge.net
Index: tixwidgets.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/tix/tixwidgets.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** tixwidgets.py 2001/05/11 19:44:55 1.2
--- tixwidgets.py 2001/11/11 14:07:37 1.3
***************
*** 1,127 ****
! #! /usr/local/bin/python
#
# $Id$
#
# tixwidgets.py --
# This is a demo program of all Tix widgets available from Python. If
# you have installed Python & Tix properly, you can execute this as
#
! # % tixwidget.py
#
import os, sys, Tix
class Demo:
! pass
! root = Tix.Tk()
! demo = Demo()
! demo.dir = None # script directory
! demo.balloon = None # balloon widget
! demo.useBalloons = Tix.StringVar()
! demo.useBalloons.set('0')
! demo.statusbar = None # status bar widget
! demo.welmsg = None # Msg widget
! demo.welfont = '' # font name
! demo.welsize = '' # font size
! def main():
! global demo, root
! progname = sys.argv[0]
! dirname = os.path.dirname(progname)
! if dirname and dirname != os.curdir:
! demo.dir = dirname
! index = -1
! for i in range(len(sys.path)):
! p = sys.path[i]
! if p in ("", os.curdir):
! index = i
! if index >= 0:
! sys.path[index] = dirname
! else:
! sys.path.insert(0, dirname)
! else:
! demo.dir = os.getcwd()
! sys.path.insert(0, demo.dir+'/samples')
! root.withdraw()
! root = Tix.Toplevel()
! root.title('Tix Widget Demonstration')
! root.geometry('780x570+50+50')
! demo.balloon = Tix.Balloon(root)
! frame1 = MkMainMenu(root)
! frame2 = MkMainNotebook(root)
! frame3 = MkMainStatus(root)
! frame1.pack(side=Tix.TOP, fill=Tix.X)
! frame3.pack(side=Tix.BOTTOM, fill=Tix.X)
! frame2.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=4, pady=4)
! demo.balloon['statusbar'] = demo.statusbar
! root.mainloop()
! def exit_cmd(event=None):
! sys.exit()
! def MkMainMenu(top):
! global demo
! w = Tix.Frame(top, bd=2, relief=Tix.RAISED)
! file = Tix.Menubutton(w, text='File', underline=0, takefocus=0)
! help = Tix.Menubutton(w, text='Help', underline=0, takefocus=0)
! file.pack(side=Tix.LEFT)
! help.pack(side=Tix.RIGHT)
! fm = Tix.Menu(file)
! file['menu'] = fm
! hm = Tix.Menu(help)
! help['menu'] = hm
! fm.add_command(label='Exit', underline=1, accelerator='Ctrl+X',
! command=exit_cmd)
! hm.add_checkbutton(label='BalloonHelp', underline=0, command=ToggleHelp,
! variable=demo.useBalloons)
! # The trace variable option doesn't seem to work, instead I use 'command'
! #apply(w.tk.call, ('trace', 'variable', demo.useBalloons, 'w',
! # ToggleHelp))
! top.bind_all("<Control-x>", exit_cmd)
! top.bind_all("<Control-X>", exit_cmd)
! return w
! def MkMainNotebook(top):
! top.option_add('*TixNoteBook*tagPadX', 6)
! top.option_add('*TixNoteBook*tagPadY', 4)
! top.option_add('*TixNoteBook*borderWidth', 2)
! top.option_add('*TixNoteBook*font',
! '-*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*')
! w = Tix.NoteBook(top, ipadx=5, ipady=5)
! w.add('wel', label='Welcome', underline=0,
! createcmd=lambda w=w, name='wel': MkWelcome(w, name))
! w.add('cho', label='Choosers', underline=0,
! createcmd=lambda w=w, name='cho': MkChoosers(w, name))
! w.add('scr', label='Scrolled Widgets', underline=0,
! createcmd=lambda w=w, name='scr': MkScroll(w, name))
! w.add('mgr', label='Manager Widgets', underline=0,
! createcmd=lambda w=w, name='mgr': MkManager(w, name))
! w.add('dir', label='Directory List', underline=0,
! createcmd=lambda w=w, name='dir': MkDirList(w, name))
! w.add('exp', label='Run Sample Programs', underline=0,
! createcmd=lambda w=w, name='exp': MkSample(w, name))
! return w
! def MkMainStatus(top):
! global demo
! w = Tix.Frame(top, relief=Tix.RAISED, bd=1)
! demo.statusbar = Tix.Label(w, relief=Tix.SUNKEN, bd=1, font='-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*')
! demo.statusbar.form(padx=3, pady=3, left=0, right='%70')
! return w
def MkWelcome(nb, name):
w = nb.page(name)
bar = MkWelcomeBar(w)
text = MkWelcomeText(w)
! bar.pack(side=Tix.TOP, fill=Tix.X, padx=2, pady=2)
! text.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
def MkWelcomeBar(top):
--- 1,162 ----
! # -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id$
#
# tixwidgets.py --
+ #
+ # For Tix, see http://tix.sourceforge.net
+ #
# This is a demo program of all Tix widgets available from Python. If
# you have installed Python & Tix properly, you can execute this as
#
! # % python tixwidget.py
#
import os, sys, Tix
+ from Tkconstants import *
+ TCL_DONT_WAIT = 1<<1
+ TCL_WINDOW_EVENTS = 1<<2
+ TCL_FILE_EVENTS = 1<<3
+ TCL_TIMER_EVENTS = 1<<4
+ TCL_IDLE_EVENTS = 1<<5
+ TCL_ALL_EVENTS = 0
+
class Demo:
! def __init__(self, top):
! self.root = top
! self.exit = -1
! self.dir = None # script directory
! self.balloon = None # balloon widget
! self.useBalloons = Tix.StringVar()
! self.useBalloons.set('0')
! self.statusbar = None # status bar widget
! self.welmsg = None # Msg widget
! self.welfont = '' # font name
! self.welsize = '' # font size
! progname = sys.argv[0]
! dirname = os.path.dirname(progname)
! if dirname and dirname != os.curdir:
! self.dir = dirname
! index = -1
! for i in range(len(sys.path)):
! p = sys.path[i]
! if p in ("", os.curdir):
! index = i
! if index >= 0:
! sys.path[index] = dirname
! else:
! sys.path.insert(0, dirname)
! else:
! self.dir = os.getcwd()
! sys.path.insert(0, self.dir+'/samples')
! def MkMainMenu(self):
! top = self.root
! w = Tix.Frame(top, bd=2, relief=RAISED)
! file = Tix.Menubutton(w, text='File', underline=0, takefocus=0)
! help = Tix.Menubutton(w, text='Help', underline=0, takefocus=0)
! file.pack(side=LEFT)
! help.pack(side=RIGHT)
! fm = Tix.Menu(file)
! file['menu'] = fm
! hm = Tix.Menu(help)
! help['menu'] = hm
! if w.tk.eval ('info commands console') == "console":
! fm.add_command(label='Console', underline=1,
! command=lambda w=w: w.tk.eval('console show'))
! fm.add_command(label='Exit', underline=1, accelerator='Ctrl+X',
! command = lambda self=self: self.quitcmd () )
! hm.add_checkbutton(label='BalloonHelp', underline=0, command=ToggleHelp,
! variable=self.useBalloons)
! # The trace variable option doesn't seem to work, instead I use 'command'
! #apply(w.tk.call, ('trace', 'variable', self.useBalloons, 'w',
! # ToggleHelp))
! return w
! def MkMainNotebook(self):
! top = self.root
! w = Tix.NoteBook(top, ipadx=5, ipady=5, options="""
! *TixNoteBook*tagPadX 6
! *TixNoteBook*tagPadY 4
! *TixNoteBook*borderWidth 2
! """)
! # This may be required if there is no *Background option
! top['bg'] = w['bg']
! w.add('wel', label='Welcome', underline=0,
! createcmd=lambda w=w, name='wel': MkWelcome(w, name))
! w.add('cho', label='Choosers', underline=0,
! createcmd=lambda w=w, name='cho': MkChoosers(w, name))
! w.add('scr', label='Scrolled Widgets', underline=0,
! createcmd=lambda w=w, name='scr': MkScroll(w, name))
! w.add('mgr', label='Manager Widgets', underline=0,
! createcmd=lambda w=w, name='mgr': MkManager(w, name))
! w.add('dir', label='Directory List', underline=0,
! createcmd=lambda w=w, name='dir': MkDirList(w, name))
! w.add('exp', label='Run Sample Programs', underline=0,
! createcmd=lambda w=w, name='exp': MkSample(w, name))
! return w
! def MkMainStatus(self):
! global demo
! top = self.root
! w = Tix.Frame(top, relief=Tix.RAISED, bd=1)
! demo.statusbar = Tix.Label(w, relief=Tix.SUNKEN, bd=1)
! demo.statusbar.form(padx=3, pady=3, left=0, right='%70')
! return w
! def build(self):
! root = self.root
! z = root.winfo_toplevel()
! z.wm_title('Tix Widget Demonstration')
! z.geometry('790x590+10+10')
! demo.balloon = Tix.Balloon(root)
! frame1 = self.MkMainMenu()
! frame2 = self.MkMainNotebook()
! frame3 = self.MkMainStatus()
! frame1.pack(side=TOP, fill=X)
! frame3.pack(side=BOTTOM, fill=X)
! frame2.pack(side=TOP, expand=1, fill=BOTH, padx=4, pady=4)
! demo.balloon['statusbar'] = demo.statusbar
! z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
! def quitcmd (self):
! # self.root.destroy()
! self.exit = 0
! def loop(self):
! while self.exit < 0:
! self.root.tk.dooneevent(TCL_ALL_EVENTS)
! # self.root.tk.dooneevent(TCL_DONT_WAIT)
!
! def destroy (self):
! self.root.destroy()
!
! def RunMain(top):
! global demo, root
!
! demo = Demo(top)
!
! # top.withdraw()
! # root = Tix.Toplevel()
! root = top
! demo.build()
! demo.loop()
! demo.destroy()
+ # Tabs
def MkWelcome(nb, name):
w = nb.page(name)
bar = MkWelcomeBar(w)
text = MkWelcomeText(w)
! bar.pack(side=TOP, fill=X, padx=2, pady=2)
! text.pack(side=TOP, fill=BOTH, expand=1)
def MkWelcomeBar(top):
***************
*** 168,174 ****
win = w.window
text = 'Welcome to TIX in Python'
! title = Tix.Label(win, font='-*-times-bold-r-normal-*-18-*-*-*-*-*-*-*',
bd=0, width=30, anchor=Tix.N, text=text)
! msg = Tix.Message(win, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
bd=0, width=400, anchor=Tix.N,
text='Tix is a set of mega-widgets based on TK. This program \
--- 203,209 ----
win = w.window
text = 'Welcome to TIX in Python'
! title = Tix.Label(win,
bd=0, width=30, anchor=Tix.N, text=text)
! msg = Tix.Message(win,
bd=0, width=400, anchor=Tix.N,
text='Tix is a set of mega-widgets based on TK. This program \
***************
*** 191,195 ****
if font == 'Times Roman':
font = 'times'
! fontstr = '-*-%s-bold-r-normal-*-%s-*-*-*-*-*-*-*' % (font, point)
demo.welmsg['font'] = fontstr
--- 226,230 ----
if font == 'Times Roman':
font = 'times'
! fontstr = '%s %s' % (font, point)
demo.welmsg['font'] = fontstr
***************
*** 361,365 ****
def MkFileEnt(w):
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='Press the "open file" icon button and a TixFileSelectDialog will popup.')
--- 396,400 ----
def MkFileEnt(w):
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='Press the "open file" icon button and a TixFileSelectDialog will popup.')
***************
*** 369,373 ****
def MkFileBox(w):
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixFileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.')
--- 404,408 ----
def MkFileBox(w):
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixFileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.')
***************
*** 382,386 ****
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The Select widget is also good for arranging buttons in a tool bar.')
--- 417,421 ----
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The Select widget is also good for arranging buttons in a tool bar.')
***************
*** 408,412 ****
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='There are many types of "chooser" widgets that allow the user to input different types of information')
--- 443,447 ----
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='There are many types of "chooser" widgets that allow the user to input different types of information')
***************
*** 435,439 ****
top = Tix.Frame(w, width=300, height=330)
bot = Tix.Frame(w)
! msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.')
--- 470,474 ----
top = Tix.Frame(w, width=300, height=330)
bot = Tix.Frame(w)
! msg = Tix.Message(top,
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.')
***************
*** 471,475 ****
top = Tix.Frame(w, width=330, height=330)
bot = Tix.Frame(w)
! msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
--- 506,510 ----
top = Tix.Frame(w, width=330, height=330)
bot = Tix.Frame(w)
! msg = Tix.Message(top,
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
***************
*** 501,505 ****
top = Tix.Frame(w, width=330, height=330)
bot = Tix.Frame(w)
! msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
--- 536,540 ----
top = Tix.Frame(w, width=330, height=330)
bot = Tix.Frame(w)
! msg = Tix.Message(top,
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
***************
*** 544,548 ****
def MkPanedWindow(w):
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.')
--- 579,583 ----
def MkPanedWindow(w):
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.')
***************
*** 586,590 ****
def MkNoteBook(w):
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The NoteBook widget allows you to layout a complex interface into individual pages.')
--- 621,625 ----
def MkNoteBook(w):
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The NoteBook widget allows you to layout a complex interface into individual pages.')
***************
*** 655,659 ****
def MkDirListWidget(w):
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixDirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.')
--- 690,694 ----
def MkDirListWidget(w):
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixDirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.')
***************
*** 663,667 ****
def MkExFileWidget(w):
! msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.')
--- 698,702 ----
def MkExFileWidget(w):
! msg = Tix.Message(w,
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.')
***************
*** 678,681 ****
--- 713,718 ----
'Combo Box' : 'ComboBox',
'Compound Image' : 'CmpImg',
+ 'Directory List' : 'DirList',
+ 'Directory Tree' : 'DirTree',
'Control' : 'Control',
'Notebook' : 'NoteBook',
***************
*** 687,692 ****
--- 724,821 ----
}
+ # There are still a lot of demos to be translated:
+ ## set root {
+ ## {d "File Selectors" file }
+ ## {d "Hierachical ListBox" hlist }
+ ## {d "Tabular ListBox" tlist {c tixTList}}
+ ## {d "Grid Widget" grid {c tixGrid}}
+ ## {d "Manager Widgets" manager }
+ ## {d "Scrolled Widgets" scroll }
+ ## {d "Miscellaneous Widgets" misc }
+ ## {d "Image Types" image }
+ ## }
+ ##
+ ## set image {
+ ## {d "Compound Image" cmpimg }
+ ## {d "XPM Image" xpm {i pixmap}}
+ ## }
+ ##
+ ## set cmpimg {
+ ## {f "In Buttons" CmpImg.tcl }
+ ## {f "In NoteBook" CmpImg2.tcl }
+ ## {f "Notebook Color Tabs" CmpImg4.tcl }
+ ## {f "Icons" CmpImg3.tcl }
+ ## }
+ ##
+ ## set xpm {
+ ## {f "In Button" Xpm.tcl {i pixmap}}
+ ## {f "In Menu" Xpm1.tcl {i pixmap}}
+ ## }
+ ##
+ ## set file {
+ ##added {f DirList DirList.tcl }
+ ##added {f DirTree DirTree.tcl }
+ ## {f DirSelectDialog DirDlg.tcl }
+ ## {f ExFileSelectDialog EFileDlg.tcl }
+ ## {f FileSelectDialog FileDlg.tcl }
+ ## {f FileEntry FileEnt.tcl }
+ ## }
+ ##
+ ## set hlist {
+ ## {f HList HList1.tcl }
+ ## {f CheckList ChkList.tcl {c tixCheckList}}
+ ##done {f "ScrolledHList (1)" SHList.tcl }
+ ##done {f "ScrolledHList (2)" SHList2.tcl }
+ ##done {f Tree Tree.tcl }
+ ##done {f "Tree (Dynamic)" DynTree.tcl {v win}}
+ ## }
+ ##
+ ## set tlist {
+ ## {f "ScrolledTList (1)" STList1.tcl {c tixTList}}
+ ## {f "ScrolledTList (2)" STList2.tcl {c tixTList}}
+ ## }
+ ## global tcl_platform
+ ## # This demo hangs windows
+ ## if {$tcl_platform(platform) != "windows"} {
+ ##na lappend tlist {f "TList File Viewer" STList3.tcl {c tixTList}}
+ ## }
+ ##
+ ## set grid {
+ ##na {f "Simple Grid" SGrid0.tcl {c tixGrid}}
+ ##na {f "ScrolledGrid" SGrid1.tcl {c tixGrid}}
+ ##na {f "Editable Grid" EditGrid.tcl {c tixGrid}}
+ ## }
+ ##
+ ## set scroll {
+ ## {f ScrolledListBox SListBox.tcl }
+ ## {f ScrolledText SText.tcl }
+ ## {f ScrolledWindow SWindow.tcl }
+ ##na {f "Canvas Object View" CObjView.tcl {c tixCObjView}}
+ ## }
+ ##
+ ## set manager {
+ ##na {f ListNoteBook ListNBK.tcl }
+ ## {f NoteBook NoteBook.tcl }
+ ## {f PanedWindow PanedWin.tcl }
+ ## }
+ ##
+ ## set misc {
+ ##done {f Balloon Balloon.tcl }
+ ##done {f ButtonBox BtnBox.tcl }
+ ##done {f ComboBox ComboBox.tcl }
+ ##done {f Control Control.tcl }
+ ## {f LabelEntry LabEntry.tcl }
+ ## {f LabelFrame LabFrame.tcl }
+ ##na {f Meter Meter.tcl {c tixMeter}}
+ ##done {f OptionMenu OptMenu.tcl }
+ ##done {f PopupMenu PopMenu.tcl }
+ ## {f Select Select.tcl }
+ ## {f StdButtonBox StdBBox.tcl }
+ ## }
+ ##
+
stypes = {}
stypes['widget'] = ['Balloon', 'Button Box', 'Combo Box', 'Control',
+ 'Directory List', 'Directory Tree',
'Notebook', 'Option Menu', 'Popup Menu',
'ScrolledHList (1)', 'ScrolledHList (2)', 'Tree (dynamic)']
***************
*** 708,712 ****
stext = Tix.ScrolledText(w, name='stext')
! stext.text.bind('<1>', stext.text.focus())
stext.text.bind('<Up>', lambda w=stext.text: w.yview(scroll='-1 unit'))
stext.text.bind('<Down>', lambda w=stext.text: w.yview(scroll='1 unit'))
--- 837,843 ----
stext = Tix.ScrolledText(w, name='stext')
! font = root.tk.eval('tix option get fixed_font')
! stext.text.config(font=font)
! # stext.text.bind('<1>', stext.text.focus())
stext.text.bind('<Up>', lambda w=stext.text: w.yview(scroll='-1 unit'))
stext.text.bind('<Down>', lambda w=stext.text: w.yview(scroll='1 unit'))
***************
*** 727,731 ****
stext.text['state'] = 'disabled'
stext.text['wrap'] = 'none'
- #XXX stext.text['font'] = fixed_font
slb.hlist['separator'] = '.'
--- 858,861 ----
***************
*** 786,789 ****
--- 916,920 ----
def LoadFile(w, fname):
+ global root
b = Tix.Button(w, text='Close', command=w.destroy)
t = Tix.ScrolledText(w)
***************
*** 793,799 ****
b.pack()
! t.text['highlightcolor'] = t['bg']
t.text['bd'] = 2
- t.text['bg'] = t['bg']
t.text['wrap'] = 'none'
--- 924,930 ----
b.pack()
! font = root.tk.eval('tix option get fixed_font')
! t.text.config(font=font)
t.text['bd'] = 2
t.text['wrap'] = 'none'
***************
*** 816,819 ****
if __name__ == '__main__':
! main()
--- 947,951 ----
if __name__ == '__main__':
! root = Tix.Tk()
! RunMain(root)
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject/template-carbon template.prj.xml,1.2,1.3
- Next message: [Python-checkins] CVS: python/dist/src/Demo/tix/samples DirList.py,NONE,1.1 DirTree.py,NONE,1.1 SHList1.py,1.1,1.2 SHList2.py,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]