Beispiel #1
0
class ProgressDialog(ModalDialog):

    class_name = 'ProgressDialog'

    def __init__(self, master, title='', dlgname='__dialog__'):
        self.master = master
        self.title = title
        ModalDialog.__init__(self, master, name=dlgname)

    def build_dlg(self):
        root = TFrame(self.top, style='FlatFrame', borderwidth=10)
        root.pack(side=TOP, fill=BOTH, expand=1)

        label = TLabel(root, text='', style='FlatLabel', textvariable=info1)
        label.pack(side=TOP, anchor=W, pady=5)

        label = TLabel(root, text='', style='FlatLabel', textvariable=info2)
        label.pack(side=TOP, anchor=W, pady=5)

        self.prgrs = TProgressbar(root,
                                  orient='horizontal',
                                  style='Horizontal.Progress',
                                  length=450,
                                  value=10,
                                  variable=info3)
        self.prgrs.pack(side=TOP, anchor=W)

        self.top.protocol('WM_DELETE_WINDOW', self.cancel)
        self.top.resizable(width=0, height=0)

    def RunDialog(self, callback, *arg):
        app.info_win = self.top
        self.wait = 0
        ModalDialog.RunDialog(self)
        self.top.update()
        result = callback(arg)
        ##### --> return from callback
        self.CloseDialog()
        return result

    def CloseDialog(self):
        self.close_dlg()
        self.top.destroy()
        info3.set(0)
        app.info_win = None
Beispiel #2
0
    def build_dlg(self):
        root = TFrame(self.top, style='FlatFrame', borderwidth=10)
        root.pack(side=TOP, fill=BOTH, expand=1)

        label = TLabel(root, text='', style='FlatLabel', textvariable=info1)
        label.pack(side=TOP, anchor=W, pady=5)

        label = TLabel(root, text='', style='FlatLabel', textvariable=info2)
        label.pack(side=TOP, anchor=W, pady=5)

        self.prgrs = TProgressbar(root,
                                  orient='horizontal',
                                  style='Horizontal.Progress',
                                  length=450,
                                  value=10,
                                  variable=info3)
        self.prgrs.pack(side=TOP, anchor=W)

        self.top.protocol('WM_DELETE_WINDOW', self.cancel)
        self.top.resizable(width=0, height=0)
Beispiel #3
0
class ProgressDialog(ModalDialog):

	class_name = 'ProgressDialog'
	
	def __init__(self, master, title = '', dlgname = '__dialog__'):
		self.master=master
		self.title = title
		ModalDialog.__init__(self, master, name = dlgname)
	
	def build_dlg(self):		
		root = TFrame(self.top, style='FlatFrame', borderwidth = 10)
		root.pack(side = TOP, fill = BOTH, expand = 1)
	
		label = TLabel(root, text = '', style='FlatLabel', textvariable=info1)
		label.pack(side = TOP, anchor=W, pady=5)
		
		label = TLabel(root, text = '', style='FlatLabel', textvariable=info2)
		label.pack(side = TOP, anchor=W, pady=5)
		
		self.prgrs = TProgressbar(root, orient = 'horizontal', style='Horizontal.Progress',
								length = 450, value=10, variable=info3)
		self.prgrs.pack(side = TOP, anchor=W)

		self.top.protocol('WM_DELETE_WINDOW', self.cancel)		
		self.top.resizable (width=0, height=0)
		
	def RunDialog(self, callback, *arg):
		app.info_win = self.top
		self.wait=0		
		ModalDialog.RunDialog(self)
		self.top.update()		
		result=callback(arg)
		##### --> return from callback
		self.CloseDialog()
		return result
	
	def CloseDialog(self):
		self.close_dlg()
		self.top.destroy()
		info3.set(0)
		app.info_win = None
Beispiel #4
0
	def build_dlg(self):		
		root = TFrame(self.top, style='FlatFrame', borderwidth = 10)
		root.pack(side = TOP, fill = BOTH, expand = 1)
	
		label = TLabel(root, text = '', style='FlatLabel', textvariable=info1)
		label.pack(side = TOP, anchor=W, pady=5)
		
		label = TLabel(root, text = '', style='FlatLabel', textvariable=info2)
		label.pack(side = TOP, anchor=W, pady=5)
		
		self.prgrs = TProgressbar(root, orient = 'horizontal', style='Horizontal.Progress',
								length = 450, value=10, variable=info3)
		self.prgrs.pack(side = TOP, anchor=W)

		self.top.protocol('WM_DELETE_WINDOW', self.cancel)		
		self.top.resizable (width=0, height=0)