Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions | Private Attributes
pynche.pyColorChooser.Tester Class Reference

List of all members.

Public Member Functions

def __init__
def run

Private Member Functions

def __choose
def __quit

Private Attributes

 __root
 __l

Detailed Description

Definition at line 97 of file pyColorChooser.py.


Constructor & Destructor Documentation

Definition at line 98 of file pyColorChooser.py.

00098 
00099         def __init__(self):
00100             self.__root = tk = Tk()
00101             b = Button(tk, text='Choose Color...', command=self.__choose)
00102             b.pack()
00103             self.__l = Label(tk)
00104             self.__l.pack()
00105             q = Button(tk, text='Quit', command=self.__quit)
00106             q.pack()

Here is the caller graph for this function:


Member Function Documentation

def pynche.pyColorChooser.Tester.__choose (   self,
  event = None 
) [private]

Definition at line 107 of file pyColorChooser.py.

00107 
00108         def __choose(self, event=None):
00109             rgb, name = askcolor(master=self.__root)
00110             if rgb is None:
00111                 text = 'You hit CANCEL!'
00112             else:
00113                 r, g, b = rgb
00114                 text = 'You picked %s (%3d/%3d/%3d)' % (name, r, g, b)
00115             self.__l.configure(text=text)

Here is the call graph for this function:

def pynche.pyColorChooser.Tester.__quit (   self,
  event = None 
) [private]

Definition at line 116 of file pyColorChooser.py.

00116 
00117         def __quit(self, event=None):
00118             self.__root.quit()

Here is the caller graph for this function:

Definition at line 119 of file pyColorChooser.py.

00119 
00120         def run(self):
00121             self.__root.mainloop()
    t = Tester()

Member Data Documentation

Definition at line 102 of file pyColorChooser.py.

Definition at line 99 of file pyColorChooser.py.


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