Current Path: > > lib64 > python2.7 > Demo > tix > samples
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
Balloon.py | File | 2264 bytes | April 19 2020 21:13:39. | |
Balloon.pyc | File | 2652 bytes | April 10 2024 04:58:47. | |
Balloon.pyo | File | 2652 bytes | April 10 2024 04:58:47. | |
BtnBox.py | File | 1566 bytes | April 19 2020 21:13:39. | |
BtnBox.pyc | File | 1346 bytes | April 10 2024 04:58:47. | |
BtnBox.pyo | File | 1346 bytes | April 10 2024 04:58:47. | |
CmpImg.py | File | 7217 bytes | April 19 2020 21:13:39. | |
CmpImg.pyc | File | 6558 bytes | April 10 2024 04:58:47. | |
CmpImg.pyo | File | 6558 bytes | April 10 2024 04:58:47. | |
ComboBox.py | File | 3412 bytes | April 19 2020 21:13:39. | |
ComboBox.pyc | File | 2802 bytes | April 10 2024 04:58:47. | |
ComboBox.pyo | File | 2802 bytes | April 10 2024 04:58:47. | |
Control.py | File | 4131 bytes | April 19 2020 21:13:39. | |
Control.pyc | File | 4038 bytes | April 10 2024 04:58:47. | |
Control.pyo | File | 4038 bytes | April 10 2024 04:58:47. | |
DirList.py | File | 4569 bytes | April 19 2020 21:13:39. | |
DirList.pyc | File | 4507 bytes | April 10 2024 04:58:47. | |
DirList.pyo | File | 4507 bytes | April 10 2024 04:58:47. | |
DirTree.py | File | 4063 bytes | April 19 2020 21:13:39. | |
DirTree.pyc | File | 4076 bytes | April 10 2024 04:58:47. | |
DirTree.pyo | File | 4076 bytes | April 10 2024 04:58:47. | |
NoteBook.py | File | 3961 bytes | April 19 2020 21:13:39. | |
NoteBook.pyc | File | 2911 bytes | April 10 2024 04:58:47. | |
NoteBook.pyo | File | 2911 bytes | April 10 2024 04:58:47. | |
OptMenu.py | File | 2449 bytes | April 19 2020 21:13:39. | |
OptMenu.pyc | File | 2146 bytes | April 10 2024 04:58:47. | |
OptMenu.pyo | File | 2146 bytes | April 10 2024 04:58:47. | |
PanedWin.py | File | 3833 bytes | April 19 2020 21:13:39. | |
PanedWin.pyc | File | 4232 bytes | April 10 2024 04:58:47. | |
PanedWin.pyo | File | 4232 bytes | April 10 2024 04:58:47. | |
PopMenu.py | File | 2104 bytes | April 19 2020 21:13:39. | |
PopMenu.pyc | File | 1877 bytes | April 10 2024 04:58:47. | |
PopMenu.pyo | File | 1877 bytes | April 10 2024 04:58:47. | |
SHList1.py | File | 3966 bytes | April 19 2020 21:13:39. | |
SHList1.pyc | File | 3681 bytes | April 10 2024 04:58:47. | |
SHList1.pyo | File | 3681 bytes | April 10 2024 04:58:47. | |
SHList2.py | File | 5634 bytes | April 19 2020 21:13:39. | |
SHList2.pyc | File | 4570 bytes | April 10 2024 04:58:47. | |
SHList2.pyo | File | 4570 bytes | April 10 2024 04:58:47. | |
Tree.py | File | 2863 bytes | April 19 2020 21:13:39. | |
Tree.pyc | File | 2355 bytes | April 10 2024 04:58:47. | |
Tree.pyo | File | 2355 bytes | April 10 2024 04:58:47. |
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*- # # $Id$ # # Tix Demonstration Program # # This sample program is structured in such a way so that it can be # executed from the Tix demo program "tixwidgets.py": it must have a # procedure called "RunSample". It should also have the "if" statment # at the end of this file so that it can be run as a standalone # program. # This file demonstrates the use of the compound images: it uses compound # images to display a text string together with a pixmap inside # buttons # import Tix network_pixmap = """/* XPM */ static char * netw_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 7 1", /* colors */ " s None c None", ". c #000000000000", "X c white", "o c #c000c000c000", "O c #404040", "+ c blue", "@ c red", /* pixels */ " ", " .............. ", " .XXXXXXXXXXXX. ", " .XooooooooooO. ", " .Xo.......XoO. ", " .Xo.++++o+XoO. ", " .Xo.++++o+XoO. ", " .Xo.++oo++XoO. ", " .Xo.++++++XoO. ", " .Xo.+o++++XoO. ", " .Xo.++++++XoO. ", " .Xo.XXXXXXXoO. ", " .XooooooooooO. ", " .Xo@ooo....oO. ", " .............. .XooooooooooO. ", " .XXXXXXXXXXXX. .XooooooooooO. ", " .XooooooooooO. .OOOOOOOOOOOO. ", " .Xo.......XoO. .............. ", " .Xo.++++o+XoO. @ ", " .Xo.++++o+XoO. @ ", " .Xo.++oo++XoO. @ ", " .Xo.++++++XoO. @ ", " .Xo.+o++++XoO. @ ", " .Xo.++++++XoO. ..... ", " .Xo.XXXXXXXoO. .XXX. ", " .XooooooooooO.@@@@@@.X O. ", " .Xo@ooo....oO. .OOO. ", " .XooooooooooO. ..... ", " .XooooooooooO. ", " .OOOOOOOOOOOO. ", " .............. ", " "}; """ hard_disk_pixmap = """/* XPM */ static char * drivea_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 5 1", /* colors */ " s None c None", ". c #000000000000", "X c white", "o c #c000c000c000", "O c #800080008000", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " .......................... ", " .XXXXXXXXXXXXXXXXXXXXXXXo. ", " .XooooooooooooooooooooooO. ", " .Xooooooooooooooooo..oooO. ", " .Xooooooooooooooooo..oooO. ", " .XooooooooooooooooooooooO. ", " .Xoooooooo.......oooooooO. ", " .Xoo...................oO. ", " .Xoooooooo.......oooooooO. ", " .XooooooooooooooooooooooO. ", " .XooooooooooooooooooooooO. ", " .XooooooooooooooooooooooO. ", " .XooooooooooooooooooooooO. ", " .oOOOOOOOOOOOOOOOOOOOOOOO. ", " .......................... ", " ", " ", " ", " ", " ", " ", " ", " "}; """ network_bitmap = """ #define netw_width 32 #define netw_height 32 static unsigned char netw_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x52, 0x00, 0x00, 0x0a, 0x52, 0x00, 0x00, 0x8a, 0x51, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x02, 0x40, 0xfe, 0x7f, 0x52, 0x55, 0x02, 0x40, 0xaa, 0x6a, 0xfa, 0x5f, 0xfe, 0x7f, 0x0a, 0x50, 0xfe, 0x7f, 0x0a, 0x52, 0x80, 0x00, 0x0a, 0x52, 0x80, 0x00, 0x8a, 0x51, 0x80, 0x00, 0x0a, 0x50, 0x80, 0x00, 0x4a, 0x50, 0x80, 0x00, 0x0a, 0x50, 0xe0, 0x03, 0x0a, 0x50, 0x20, 0x02, 0xfa, 0xdf, 0x3f, 0x03, 0x02, 0x40, 0xa0, 0x02, 0x52, 0x55, 0xe0, 0x03, 0xaa, 0x6a, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; """ hard_disk_bitmap = """ #define drivea_width 32 #define drivea_height 32 static unsigned char drivea_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x18, 0xa8, 0xaa, 0xaa, 0x1a, 0x48, 0x55, 0xd5, 0x1d, 0xa8, 0xaa, 0xaa, 0x1b, 0x48, 0x55, 0x55, 0x1d, 0xa8, 0xfa, 0xaf, 0x1a, 0xc8, 0xff, 0xff, 0x1d, 0xa8, 0xfa, 0xaf, 0x1a, 0x48, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1a, 0x48, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1a, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; """ def RunSample(w): w.img0 = Tix.Image('pixmap', data=network_pixmap) if not w.img0: w.img0 = Tix.Image('bitmap', data=network_bitmap) w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap) if not w.img0: w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap) hdd = Tix.Button(w, padx=4, pady=1, width=120) net = Tix.Button(w, padx=4, pady=1, width=120) # Create the first image: we create a line, then put a string, # a space and an image into this line, from left to right. # The result: we have a one-line image that consists of three # individual items # # The tk.calls should be methods in Tix ... w.hdd_img = Tix.Image('compound', window=hdd) w.hdd_img.tk.call(str(w.hdd_img), 'add', 'line') w.hdd_img.tk.call(str(w.hdd_img), 'add', 'text', '-text', 'Hard Disk', '-underline', '0') w.hdd_img.tk.call(str(w.hdd_img), 'add', 'space', '-width', '7') w.hdd_img.tk.call(str(w.hdd_img), 'add', 'image', '-image', w.img1) # Put this image into the first button # hdd['image'] = w.hdd_img # Next button w.net_img = Tix.Image('compound', window=net) w.net_img.tk.call(str(w.net_img), 'add', 'line') w.net_img.tk.call(str(w.net_img), 'add', 'text', '-text', 'Network', '-underline', '0') w.net_img.tk.call(str(w.net_img), 'add', 'space', '-width', '7') w.net_img.tk.call(str(w.net_img), 'add', 'image', '-image', w.img0) # Put this image into the first button # net['image'] = w.net_img close = Tix.Button(w, pady=1, text='Close', command=lambda w=w: w.destroy()) hdd.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1) net.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1) close.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1) if __name__ == '__main__': root = Tix.Tk() RunSample(root) root.mainloop()
SILENT KILLER Tool