Lines Matching full:tix
7 # For Tix, see http://tix.sourceforge.net
9 # This is a demo program of some of the Tix widgets available in Python.
10 # If you have installed Python & Tix properly, you can execute this as
15 import os, os.path, sys, Tix
33 self.useBalloons = Tix.StringVar()
59 w = Tix.Frame(top, bd=2, relief=RAISED)
60 file = Tix.Menubutton(w, text='File', underline=0, takefocus=0)
61 help = Tix.Menubutton(w, text='Help', underline=0, takefocus=0)
64 fm = Tix.Menu(file, tearoff=0)
66 hm = Tix.Menu(help, tearoff=0)
81 w = Tix.NoteBook(top, ipadx=5, ipady=5, options="""
107 w = Tix.Frame(top, relief=Tix.RAISED, bd=1)
108 demo.statusbar = Tix.Label(w, relief=Tix.SUNKEN, bd=1)
115 z.wm_title('Tix Widget Demonstration')
120 demo.balloon = Tix.Balloon(root)
195 w = Tix.Frame(top, bd=2, relief=Tix.GROOVE)
196 b1 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
197 b2 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
206 b1.insert(Tix.END, 'Courier')
207 b1.insert(Tix.END, 'Helvetica')
208 b1.insert(Tix.END, 'Lucida')
209 b1.insert(Tix.END, 'Times Roman')
211 b2.insert(Tix.END, '8')
212 b2.insert(Tix.END, '10')
213 b2.insert(Tix.END, '12')
214 b2.insert(Tix.END, '14')
215 b2.insert(Tix.END, '18')
220 b1.pack(side=Tix.LEFT, padx=4, pady=4)
221 b2.pack(side=Tix.LEFT, padx=4, pady=4)
232 w = Tix.ScrolledWindow(top, scrollbar='auto')
234 text = 'Welcome to TIX in Python'
235 title = Tix.Label(win,
236 bd=0, width=30, anchor=Tix.N, text=text)
237 msg = Tix.Message(win,
238 bd=0, width=400, anchor=Tix.N,
239 text='Tix is a set of mega-widgets based on TK. This program \
240 demonstrates the widgets in the Tix widget set. You can choose the pages \
243 For more information, see http://tix.sourceforge.net.')
244 title.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
245 msg.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
271 til = Tix.LabelFrame(w, label='Chooser Widgets', options=options)
272 cbx = Tix.LabelFrame(w, label='tixComboBox', options=options)
273 ctl = Tix.LabelFrame(w, label='tixControl', options=options)
274 sel = Tix.LabelFrame(w, label='tixSelect', options=options)
275 opt = Tix.LabelFrame(w, label='tixOptionMenu', options=options)
276 fil = Tix.LabelFrame(w, label='tixFileEntry', options=options)
277 fbx = Tix.LabelFrame(w, label='tixFileSelectBox', options=options)
278 tbr = Tix.LabelFrame(w, label='Tool Bar', options=options)
305 options="label.width %d label.anchor %s entry.width %d" % (10, Tix.E, 14)
307 static = Tix.ComboBox(w, label='Static', editable=0, options=options)
308 editable = Tix.ComboBox(w, label='Editable', editable=1, options=options)
309 history = Tix.ComboBox(w, label='History', editable=1, history=1,
310 anchor=Tix.E, options=options)
311 static.insert(Tix.END, 'January')
312 static.insert(Tix.END, 'February')
313 static.insert(Tix.END, 'March')
314 static.insert(Tix.END, 'April')
315 static.insert(Tix.END, 'May')
316 static.insert(Tix.END, 'June')
317 static.insert(Tix.END, 'July')
318 static.insert(Tix.END, 'August')
319 static.insert(Tix.END, 'September')
320 static.insert(Tix.END, 'October')
321 static.insert(Tix.END, 'November')
322 static.insert(Tix.END, 'December')
324 editable.insert(Tix.END, 'Angola')
325 editable.insert(Tix.END, 'Bangladesh')
326 editable.insert(Tix.END, 'China')
327 editable.insert(Tix.END, 'Denmark')
328 editable.insert(Tix.END, 'Ecuador')
330 history.insert(Tix.END, '/usr/bin/ksh')
331 history.insert(Tix.END, '/usr/local/lib/python')
332 history.insert(Tix.END, '/var/adm')
334 static.pack(side=Tix.TOP, padx=5, pady=3)
335 editable.pack(side=Tix.TOP, padx=5, pady=3)
336 history.pack(side=Tix.TOP, padx=5, pady=3)
363 options="label.width %d label.anchor %s entry.width %d" % (10, Tix.E, 13)
365 demo_spintxt = Tix.StringVar()
367 simple = Tix.Control(w, label='Numbers', options=options)
368 spintxt = Tix.Control(w, label='States', variable=demo_spintxt,
374 simple.pack(side=Tix.TOP, padx=5, pady=3)
375 spintxt.pack(side=Tix.TOP, padx=5, pady=3)
378 options = "label.anchor %s" % Tix.CENTER
380 sel1 = Tix.Select(w, label='Mere Mortals', allowzero=1, radio=1,
381 orientation=Tix.VERTICAL,
382 labelside=Tix.TOP,
384 sel2 = Tix.Select(w, label='Geeks', allowzero=1, radio=0,
385 orientation=Tix.VERTICAL,
386 labelside= Tix.TOP,
401 sel1.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
402 sel2.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
405 options='menubutton.width 15 label.anchor %s' % Tix.E
407 m = Tix.OptionMenu(w, label='File Format : ', options=options)
416 m.pack(fill=Tix.X, padx=5, pady=3)
419 msg = Tix.Message(w,
420 relief=Tix.FLAT, width=240, anchor=Tix.N,
422 ent = Tix.FileEntry(w, label='Select a file : ')
423 msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
424 ent.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
431 msg = Tix.Message(w,
432 relief=Tix.FLAT, width=240, anchor=Tix.N,
433 …text='The Tix FileSelectBox is a Motif-style box with various enhancements. For example, you can a…
434 box = Tix.FileSelectBox(w)
435 msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
436 box.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
445 msg = Tix.Message(w,
446 relief=Tix.FLAT, width=240, anchor=Tix.N,
448 bar = Tix.Frame(w, bd=2, relief=Tix.RAISED)
449 font = Tix.Select(w, allowzero=1, radio=0, label='', options=options)
450 para = Tix.Select(w, allowzero=0, radio=1, label='', options=options)
462 msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
463 bar.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
464 font.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
465 para.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
468 msg = Tix.Message(w,
469 relief=Tix.FLAT, width=240, anchor=Tix.N,
471 msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
477 sls = Tix.LabelFrame(w, label='Tix.ScrolledListBox', options=options)
478 swn = Tix.LabelFrame(w, label='Tix.ScrolledWindow', options=options)
479 stx = Tix.LabelFrame(w, label='Tix.ScrolledText', options=options)
494 top = Tix.Frame(w, width=300, height=330)
495 bot = Tix.Frame(w)
496 msg = Tix.Message(top,
497 relief=Tix.FLAT, width=200, anchor=Tix.N,
500 list = Tix.ScrolledListBox(top, scrollbar='auto')
502 list.listbox.insert(Tix.END, 'Alabama')
503 list.listbox.insert(Tix.END, 'California')
504 list.listbox.insert(Tix.END, 'Montana')
505 list.listbox.insert(Tix.END, 'New Jersey')
506 list.listbox.insert(Tix.END, 'New York')
507 list.listbox.insert(Tix.END, 'Pennsylvania')
508 list.listbox.insert(Tix.END, 'Washington')
510 rh = Tix.ResizeHandle(top, bg='black',
511 relief=Tix.RAISED,
513 btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=list: SList_reset(w,x))
515 msg.pack(fill=Tix.X)
516 btn.pack(anchor=Tix.CENTER)
517 top.pack(expand=1, fill=Tix.BOTH)
518 bot.pack(fill=Tix.BOTH)
533 …text = 'The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versa…
535 file = os.path.join(demo.dir, 'bitmaps', 'tix.gif')
539 top = Tix.Frame(w, width=330, height=330)
540 bot = Tix.Frame(w)
541 msg = Tix.Message(top,
542 relief=Tix.FLAT, width=200, anchor=Tix.N,
545 win = Tix.ScrolledWindow(top, scrollbar='auto')
548 lbl = Tix.Label(win.window, image=image1)
549 lbl.pack(expand=1, fill=Tix.BOTH)
553 rh = Tix.ResizeHandle(top, bg='black',
554 relief=Tix.RAISED,
556 btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SWindow_reset(w,x))
558 msg.pack(fill=Tix.X)
559 btn.pack(anchor=Tix.CENTER)
560 top.pack(expand=1, fill=Tix.BOTH)
561 bot.pack(fill=Tix.BOTH)
574 top = Tix.Frame(w, width=330, height=330)
575 bot = Tix.Frame(w)
576 msg = Tix.Message(top,
577 relief=Tix.FLAT, width=200, anchor=Tix.N,
578 …text='The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versati…
580 win = Tix.ScrolledText(top, scrollbar='auto')
582 win.text.insert(Tix.END, '''When -scrollbar is set to "auto", the
595 rh = Tix.ResizeHandle(top, bg='black',
596 relief=Tix.RAISED,
598 btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SText_reset(w,x))
600 msg.pack(fill=Tix.X)
601 btn.pack(anchor=Tix.CENTER)
602 top.pack(expand=1, fill=Tix.BOTH)
603 bot.pack(fill=Tix.BOTH)
616 pane = Tix.LabelFrame(w, label='Tix.PanedWindow', options=options)
617 note = Tix.LabelFrame(w, label='Tix.NoteBook', options=options)
630 msg = Tix.Message(w,
631 relief=Tix.FLAT, width=240, anchor=Tix.N,
633 group = Tix.LabelEntry(w, label='Newsgroup:', options='entry.width 25')
635 pane = Tix.PanedWindow(w, orientation='vertical')
639 list = Tix.ScrolledListBox(p1)
640 text = Tix.ScrolledText(p2)
642 list.listbox.insert(Tix.END, " 12324 Re: Tkinter is good for your health")
643 list.listbox.insert(Tix.END, "+ 12325 Re: Tkinter is good for your health")
644 …list.listbox.insert(Tix.END, "+ 12326 Re: Tix is even better for your health (Was: Tkinter is good…
645 …list.listbox.insert(Tix.END, " 12327 Re: Tix is even better for your health (Was: Tkinter is good…
646 …list.listbox.insert(Tix.END, "+ 12328 Re: Tix is even better for your health (Was: Tkinter is good…
647 …list.listbox.insert(Tix.END, " 12329 Re: Tix is even better for your health (Was: Tkinter is good…
648 …list.listbox.insert(Tix.END, "+ 12330 Re: Tix is even better for your health (Was: Tkinter is good…
652 text.text.insert(Tix.END, """
665 list.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
666 text.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
668 msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
669 group.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
670 pane.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH, expand=1)
673 msg = Tix.Message(w,
674 relief=Tix.FLAT, width=240, anchor=Tix.N,
676 # prefix = Tix.OptionName(w)
679 options = "entry.width %d label.width %d label.anchor %s" % (10, 18, Tix.E)
681 nb = Tix.NoteBook(w, ipadx=6, ipady=6, options=options)
686 common = Tix.Frame(nb.hard_disk)
687 common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
691 a = Tix.Control(nb.hard_disk, value=12, label='Access Time: ')
692 w = Tix.Control(nb.hard_disk, value=400, label='Write Throughput: ')
693 r = Tix.Control(nb.hard_disk, value=400, label='Read Throughput: ')
694 c = Tix.Control(nb.hard_disk, value=1021, label='Capacity: ')
695 a.pack(side=Tix.TOP, padx=20, pady=2)
696 w.pack(side=Tix.TOP, padx=20, pady=2)
697 r.pack(side=Tix.TOP, padx=20, pady=2)
698 c.pack(side=Tix.TOP, padx=20, pady=2)
700 common = Tix.Frame(nb.network)
701 common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
704 a = Tix.Control(nb.network, value=12, label='Access Time: ')
705 w = Tix.Control(nb.network, value=400, label='Write Throughput: ')
706 r = Tix.Control(nb.network, value=400, label='Read Throughput: ')
707 c = Tix.Control(nb.network, value=1021, label='Capacity: ')
708 u = Tix.Control(nb.network, value=10, label='Users: ')
709 a.pack(side=Tix.TOP, padx=20, pady=2)
710 w.pack(side=Tix.TOP, padx=20, pady=2)
711 r.pack(side=Tix.TOP, padx=20, pady=2)
712 c.pack(side=Tix.TOP, padx=20, pady=2)
713 u.pack(side=Tix.TOP, padx=20, pady=2)
715 msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
716 nb.pack(side=Tix.TOP, padx=5, pady=5, fill=Tix.BOTH, expand=1)
719 ok = Tix.Button(f, text='OK', width = 6)
720 cancel = Tix.Button(f, text='Cancel', width = 6)
721 ok.pack(side=Tix.TOP, padx=2, pady=2)
722 cancel.pack(side=Tix.TOP, padx=2, pady=2)
728 dir = Tix.LabelFrame(w, label='Tix.DirList', options=options)
729 fsbox = Tix.LabelFrame(w, label='Tix.ExFileSelectBox', options=options)
740 msg = Tix.Message(w,
741 relief=Tix.FLAT, width=240, anchor=Tix.N,
742 …text='The Tix DirList widget gives a graphical representation of the file system directory and mak…
743 dirlist = Tix.DirList(w, options='hlist.padY 1 hlist.width 25 hlist.height 16')
744 msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
745 dirlist.pack(side=Tix.TOP, padx=3, pady=3)
750 msg = Tix.Message(w,
751 relief=Tix.FLAT, width=240, anchor=Tix.N,
752 … text='The Tix ExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.')
754 box = Tix.ExFileSelectBox(w, bd=2, relief=Tix.RAISED)
755 msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
756 box.pack(side=Tix.TOP, padx=3, pady=3)
879 pane = Tix.PanedWindow(w, orientation='horizontal')
880 pane.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
886 lab = Tix.LabelFrame(f1, label='Select a sample program:')
887 lab.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=5, pady=5)
888 lab1 = Tix.LabelFrame(f2, label='Source:')
889 lab1.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=5, pady=5)
891 slb = Tix.Tree(lab.frame, options='hlist.width 20')
892 slb.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=5)
894 stext = Tix.ScrolledText(lab1.frame, name='stext')
895 font = root.tk.eval('tix option get fixed_font')
898 frame = Tix.Frame(lab1.frame, name='frame')
900 run = Tix.Button(frame, text='Run ...', name='run')
901 view = Tix.Button(frame, text='View Source ...', name='view')
902 run.pack(side=Tix.LEFT, expand=0, fill=Tix.NONE)
903 view.pack(side=Tix.LEFT, expand=0, fill=Tix.NONE)
910 frame.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X, padx=7)
911 stext.pack(side=Tix.TOP, expand=0, fill=Tix.BOTH, padx=7)
926 x = Tix.Frame(slb.hlist, bd=2, height=2, width=150,
927 relief=Tix.SUNKEN, bg=slb.hlist['bg'])
928 slb.hlist.add_child(itemtype=Tix.WINDOW, window=x, state='disabled')
929 x = slb.hlist.add_child(itemtype=Tix.TEXT, state='disabled',
932 slb.hlist.add_child(x, itemtype=Tix.TEXT, data=key,
959 w = Tix.Toplevel()
964 w = Tix.Toplevel()
972 b = Tix.Button(w, text='Close', command=w.destroy)
973 t = Tix.ScrolledText(w)
979 font = root.tk.eval('tix option get fixed_font')
989 w.delete('0.0', Tix.END)
995 w.insert(Tix.END, s)
1002 root = Tix.Tk()