GIF89a;
EcchiShell v1.0
/
/
usr/
lib64/
lib64/
python2.7/
Demo/
tix/
', lambda self=self: self.okcmd () )
top.pack( expand='yes', fill='both', side=TOP)
top.dir.pack( expand=1, fill=BOTH, padx=4, pady=4, side=LEFT)
top.btn.pack( anchor='s', padx=4, pady=4, side=LEFT)
top.ent.pack( expand=1, fill=X, anchor='s', padx=4, pady=4, side=LEFT)
# Use a ButtonBox to hold the buttons.
#
box = Tix.ButtonBox (w, orientation='horizontal')
box.add ('ok', text='Ok', underline=0, width=6,
command = lambda self=self: self.okcmd () )
box.add ('cancel', text='Cancel', underline=0, width=6,
command = lambda self=self: self.quitcmd () )
box.pack( anchor='s', fill='x', side=BOTTOM)
def copy_name (self, dir, ent):
# This should work as it is the entry's textvariable
self.dlist_dir = dir.cget('value')
# but it isn't so I'll do it manually
ent.entry.delete(0,'end')
ent.entry.insert(0, self.dlist_dir)
def okcmd (self):
# tixDemo:Status "You have selected the directory" + self.dlist_dir
self.quitcmd()
def quitcmd (self):
# tixDemo:Status "You have selected the directory" + self.dlist_dir
self.exit = 0
def mainloop(self):
while self.exit < 0:
self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
# This "if" statement makes it possible to run this script file inside or
# outside of the main demo program "tixwidgets.py".
#
if __name__== '__main__' :
root=Tix.Tk()
RunSample(root)