Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
tkinter.commondialog.Dialog Class Reference
Inheritance diagram for tkinter.commondialog.Dialog:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def show

Public Attributes

 master
 options

Static Public Attributes

 command = None

Private Member Functions

def _fixoptions
def _fixresult

Detailed Description

Definition at line 13 of file commondialog.py.


Constructor & Destructor Documentation

def tkinter.commondialog.Dialog.__init__ (   self,
  master = None,
  options 
)

Definition at line 17 of file commondialog.py.

00017 
00018     def __init__(self, master=None, **options):
00019 
00020         # FIXME: should this be placed on the module level instead?
00021         if TkVersion < 4.2:
00022             raise TclError("this module requires Tk 4.2 or newer")
00023 
00024         self.master  = master
00025         self.options = options
00026         if not master and options.get('parent'):
00027             self.master = options['parent']

Here is the caller graph for this function:


Member Function Documentation

def tkinter.commondialog.Dialog._fixoptions (   self) [private]

Reimplemented in tkinter.filedialog._Dialog, and tkinter.colorchooser.Chooser.

Definition at line 28 of file commondialog.py.

00028 
00029     def _fixoptions(self):
00030         pass # hook

Here is the caller graph for this function:

def tkinter.commondialog.Dialog._fixresult (   self,
  widget,
  result 
) [private]

Reimplemented in tkinter.filedialog.Directory, tkinter.filedialog.Open, tkinter.filedialog._Dialog, and tkinter.colorchooser.Chooser.

Definition at line 31 of file commondialog.py.

00031 
00032     def _fixresult(self, widget, result):
00033         return result # hook

Here is the caller graph for this function:

def tkinter.commondialog.Dialog.show (   self,
  options 
)

Definition at line 34 of file commondialog.py.

00034 
00035     def show(self, **options):
00036 
00037         # update instance options
00038         for k, v in options.items():
00039             self.options[k] = v
00040 
00041         self._fixoptions()
00042 
00043         # we need a dummy widget to properly process the options
00044         # (at least as long as we use Tkinter 1.63)
00045         w = Frame(self.master)
00046 
00047         try:
00048 
00049             s = w.tk.call(self.command, *w._options(self.options))
00050 
00051             s = self._fixresult(w, s)
00052 
00053         finally:
00054 
00055             try:
00056                 # get rid of the widget
00057                 w.destroy()
00058             except:
00059                 pass
00060 
00061         return s

Here is the call graph for this function:


Member Data Documentation

Definition at line 23 of file commondialog.py.

Definition at line 24 of file commondialog.py.


The documentation for this class was generated from the following file: