m=Tix.OptionMenu(w,label='File Format : ',options=options)
m.add_command('text',label='Plain Text')
m.add_command('post',label='PostScript')
m.add_command('format',label='Formatted Text')
...
...
@@ -413,7 +416,7 @@ def MkOptMenu(w):
m.pack(fill=Tix.X,padx=5,pady=3)
defMkFileEnt(w):
msg=Tix.Message(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.')
ent=Tix.FileEntry(w,label='Select a file : ')
...
...
@@ -425,7 +428,7 @@ def MkFileBox(w):
For example, you can adjust the size of the two listboxes
and your past selections are recorded.
"""
msg=Tix.Message(w,
msg=Tix.Message(w,
relief=Tix.FLAT,width=240,anchor=Tix.N,
text='The Tix FileSelectBox 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.')
box=Tix.FileSelectBox(w)
...
...
@@ -433,17 +436,18 @@ def MkFileBox(w):
box.pack(side=Tix.TOP,fill=Tix.X,padx=3,pady=3)
defMkToolBar(w):
"""The Select widget is also good for arranging buttons in a tool bar.
"""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. """
top=Tix.Frame(w,width=300,height=330)
bot=Tix.Frame(w)
msg=Tix.Message(top,
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.')
...
...
@@ -522,30 +524,30 @@ def SList_reset(rh, list):
list.update()
rh.attach_widget(list)
# See below why this is necessary.
globalimage1
image1=None
defMkSWindow(w):
globaldemo,image1
"""The ScrolledWindow widget allows you to scroll any kind of Tk
widget. It is more versatile than a scrolled canvas widget.
"""
globaldemo
text='The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.'
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.'
file=os.path.join(demo.dir,'bitmaps','tix.gif')
ifnotos.path.isfile(file):
text+=' (Image missing)'
top=Tix.Frame(w,width=330,height=330)
bot=Tix.Frame(w)
msg=Tix.Message(top,
msg=Tix.Message(top,
relief=Tix.FLAT,width=200,anchor=Tix.N,
text=text)
win=Tix.ScrolledWindow(top,scrollbar='auto')
# This image is not showing up under Python unless it is set to a
# global variable - no problem under Tcl. I assume it is being garbage
# collected some how, even though the tcl command 'image names' shows
# that as far as Tcl is concerned, the image exists and is called pyimage1.
globalimage1
# 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
"""The PanedWindow widget allows the user to interactively manipulate
the sizes of several panes. The panes can be arranged either vertically
or horizontally.
"""
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.')
"""The TixDirList widget gives a graphical representation of the file
system directory and makes it easy for the user to choose and access
directories.
"""
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.')
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.')