Beispiel #1
0
    def __init__(self, master, *args, **kwargs):
        #   gives set variables you can input when creating instance of ParentWindow
        #   args are arguments that can later be inputed
        #   kwargs are key value pair arguments that can later be inputed
        Frame.__init__(self, master, *args, **kwargs)

        #   define our master frame configuration
        self.master = master
        self.master.minsize(500, 300)  #Height, width minimum size
        self.master.maxsize(500, 300)  #Maximum size
        #   This CenterWindow method will center our app on the user's screen
        phonebook_func.center_window(self, 500, 300)
        #   accessing phonebook_func file and center_window function
        self.master.title("The Tkinter Phonebook Demo")
        #   Title of the window
        self.master.configure(bg="#F0F0F0")
        # sets a background color for our window

        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        #   lambdas are anyonymous functions, this one calls phonebook_function file
        #   and ask_quit function
        #   This protocol method is a tkinter built in method to catch if
        #   the user clicks the upper corner, X on windows OS.
        #   protocol makes a rule for the class to follow
        #   WM_DELETE_WINDOWS is the microsoft syntax for the closing X button

        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # this is the master frame configuration
        self.master = master
        self.master.minsize(500, 300)  # (height X width)
        self.master.maxsize(500, 300)

        # center the master frame on the users screen when opened
        # function called from the function module, always pass in self
        phonebook_func.center_window(self, 500, 300)
        # title of the application
        self.master.title('PhoneBook Application')
        #set background color
        self.master.configure(bg='#f0f0f0')
        # built in method to catch if the user clicks the 'X' in the upper
        # corner, in the windows OS, asks if user wants to quit
        self.master.protocol('WM_DELETE_WINDOW',
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # This will load the GUI from seperate module in order
        # to keep the code neet and tidy (compartimentalized)
        # module name, phonebook_gui.py
        phonebook_gui.load_gui(self)
Beispiel #3
0
    def __init__(
        self, master, *args, **kwargs
    ):  #this intializes, refrence the class(ParentWindow) with self, and then master is what were calling the FRAME
        Frame.__init__(self, master, *args, **kwargs)

        #define our master frame configuration
        self.master = master  #in order to access the tkinter object, we have to do self, self.master is the parentwindow frame.
        self.master.minsize(
            500, 300
        )  #(Height, Width)Sets size- By setting min/max size, we make it to where they cannot adjust the window.
        self.master.maxsize(500, 300)
        # This CenterWindow method will center our app on the user's screen
        phonebook_func.center_window(
            self, 500, 300
        )  #This will always center the window in the middle of the screen
        self.master.title("The Tkinter Phonebook Demo"
                          )  #This Creates the Title of the window.
        self.master.configure(bg="#F0F0F0")  #Background Color
        #This protocol method is a tkinter built-in method to catch if
        #the user clicks the upper corner, "X" on Windows OS.
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))

        # load in the GUI widgets from a seperate module,
        # keeping your code comparmentalized and clutter free
        phonebook_gui.load_gui(self)
    def __init__ (self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # Define our master frame configurations
        #'self' is saying 'ParentWindow' dot 'master' meaning the ParentWindow Frame.
        self.master = master
        # Set the window size Height, Width in pixels
        # The min and max sizes are the same, therefore we will not be able to resize the window.
        self.master.minsize(500,300)
        self.master.maxsize(500,300)
        # This CenterWindow method will center our app on the user's screen
        # Access phonebook_func and in it, define 'center_window' which makes the window center.
# NOTE: in order for anything to affect all the widgets on the form we have to access the widgets by passing in self.
        phonebook_func.center_window(self,500,300)
        self.master.title("The Tkinter Phonebook Demo")
        self.master.config(bg="#F0F0F0")
        # This protocol method is a tkinter built-in method to catch if
        # the user clicks the upper corner, 'X' on Windows OS to close the window.
        # Microsoft's syntax 'WM_DELETE_WINDOW', the name of a button.
        # 'protocol()' makes a rule and if this windows button is pressed, we do a lambda
        # function and call our 'phonebook_func' file which has the 'ask_quit()' within.
        self.master.protocol("WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self))

        # Load in the GUI widgets from a seperate module,
        # keeping your code compartmentalized and clutter free.
        phonebook_gui.load_gui(self)
Beispiel #5
0
    def __init__(
        self, master, *args, **kwargs
    ):  # init is a reserved method to initialize the attributes of a class
        Frame.__init__(
            self, master, *args, **kwargs
        )  # self allows to access the attributes and methods of the class

        # define master frame configuration
        self.master = master  # master = Frame, self = ParentWindow
        self.master.minsize(500, 300)  # 500 height, 300 width
        self.master.maxsize(500, 300)
        # This CenterWindow method will center app on the user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title("The Tkinter Phonebook Demo")
        self.master.configure(bg="#F0F0F0")
        # This protocol method is a tkinter built-in method to catch if
        # the user clicks the upper corner, "X" on Windows OS
        self.master.protocol(
            "WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self)
        )  # protocol: rule, lambda: call lambda function(anonymous function)
        # self: key to access everyting within the class
        #arg = self.master

        # load in the GUI widgets from a separate module
        phonebook_gui.load_gui(
            self)  # call for a load_gui function in phonebook_gui module
Beispiel #6
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.master = master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)
        phonebook_func.center_window(self, 500, 300)
        self.master.title("The Tkinter Phonebook Demo")
        self.master.configure(bg="#f0f0f0")
        self.master.protocol("WM DELETE WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        phonebook_gui.load_gui(self)
Beispiel #7
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)
        #from now a "def class" = "self" and "frame" = "master"
        #define master frame configuration
        self.master = master  #now master = self.master so the class ParentWindow(Frame) is self.master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)
        #CenterWindow method will center app on the user's screen
        phonebook_func.center_window(
            self, 500,
            300)  #accessing this file and utilizing center_window func.
        #passing in self
        self.master.title('The Tkinter Phonebook Demo')
        self.master.configure(bg='#f0f0f0')
        #this protocol methon is a tkinter buit-in method to catch if
        #the user clicks the upper corner, "X" on Windows OS---->may need to find MacOS equivilent
        self.master.protocol('WM_DELETE_WINDOW',
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        #load in the GUI widgits from a separate module,
        #keeping your code comartmentalized and clutter free
        phonebook_gui.load_gui(self)

        # Instantiate the Tkinter menu dropdown object
        # This is the menu that will appear at the top of our window
        menubar = Menu(self.master)
        filemenu = Menu(menubar, tearoff=0)
        filemenu.add_separator()
        filemenu.add_command(label="Exit",
                             underline=1,
                             accelerator="Ctrl+Q",
                             command=lambda: phonebook_func.ask_quit(self))
        menubar.add_cascade(label="File", underline=0, menu=filemenu)
        helpmenu = Menu(
            menubar, tearoff=0
        )  # defines the particular drop down colum and tearoff=0 means do not separate from menubar
        helpmenu.add_separator()
        helpmenu.add_command(label="How to use this program")
        helpmenu.add_separator()
        helpmenu.add_command(
            label="About This Phonebook Demo"
        )  # add_command is a child menubar item of the add_cascde parent item
        menubar.add_cascade(
            label="Help", menu=helpmenu
        )  # add_cascade is a parent menubar item (visible heading)
        """
            Finally, we apply the config method of the widget to display the menu
            From here we could also pass in additional aprams for additional 
            functionalityor appearances such as a borderwidth.
        """
        self.master.config(menu=menubar, borderwidth='1')
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.master = master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 400)
        phonebook_func.center_window(self, 500, 500)
        self.master.title('Tkinter Phone book Demo')
        self.master.config(bg='#f0f0f0')

        self.master.protocol("WM_DELETE_WINDOW", lambda: phonebook_func)
        arg = self.master
        phonebook_gui.load_gui(self)
Beispiel #9
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        #define our master frame configuration
        self.master = master  # we invoked master from tkinter with Frame
        self.master.minsize(500, 300)  #(height,width)
        self.master.maxsize(500, 300)
        #This CenterWindow method will center our app on the user's screen
        phonebook_func.center_window(
            self, 500,
            300)  # calling from our import, self is passed in as a key
        self.master.title("The Tkinter Phonebook Demo")
        self.master.configure(bg="#F0F0F0")
        # This protocol method is a tkinter built-in method to catch if
        # the user clicks the upper corner, "X" on Windows OS.
        self.master.protocol(
            "WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self)
        )  # miscrosoft's code for the red x in corner with an exit program catch
        arg = self.master

        # load in the GUI widgets from a separate module,
        # keeping your code compartmentalized and clutter free
        phonebook_gui.load_gui(self)

        # Instantiate the TKinter menu dropdown object
        # This is the menu that will appear at the top of our window
        menubar = Menu(self.master)
        filemenu = Menu(menubar, tearoff=0)
        filemenu.add_separator()
        filemenu.add_command(label="Exit",
                             underline=1,
                             accelerator="CTRL+Q",
                             command=lambda: phonebook_func.ask_quit(self))
        menubar.add_cascade(
            label="File", underline=0, menu=filemenu
        )  # defines the particular drop down column and tearoff=0 means do not separate from menubar
        helpmenu = Menu(menubar, tearoff=0)
        helpmenu.add_separator()
        helpmenu.add_command(label="How to use this program")
        helpmenu.add_separator()
        helpmenu.add_command(
            label="About This Phonebok Demo"
        )  # add_cascade is a parent menubar item (visible heading)
        menubar.add_cascade(label="Help", menu=helpmenu)
        '''
            Finally, we apply the config method of the widget to display the menu
            From here we could also pass in additional aprams for additional
            functionality or appearances such as a borderwidth.
        '''
        self.master.config(menu=menubar, borderwidth='1')
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        #define master frame config
        self.master = master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)
        phonebook_func.center_window(self, 500, 300)
        self.master.title("The Tinkter Phonebook Demo")
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        #DEFINE OUR MASTER FRAME CONFIGURATION
        self.master = master
        self.master.minsize(500, 300)  #(Height, Width)
        self.master.maxsize(500, 300)
        #THIS CenterWindow METHOD WILL CENTER THE APP ON THE USER'S SCREEN
        phonebook_func.center_window(self, 500, 300)
        self.master.title("Tkinter Phonebook")
        self.master.configure(bg="#F0F0F0")
        #THIS PROTOCOL METHOD IS A TKINTER BUILD-IN METHOD TO CATCH IF THE
        #USER CLICKS THE UPPER CORNER, "X" ON WINDOWS OS.
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        #LOAD IN THE GUI WIDGETS FROM A SEPARATE MODULE, KEEPING
        #YOUR CODE COMPARTMENTALIZED AND CLUTTER-FREE
        phonebook_gui.load_gui(self)

        #INSTANTIATE THE TKINTER MENU DROPDOWN OBJECT
        #THIS IS THE MENU THAT WILL APPEAR AT THE TOP OF CUR WINDOW
        menubar = Menu(self.master)
        filemenu = Menu(menubar, tearoff=0)
        filemenu.add_separator()
        filemenu.add_command(label="Exit",
                             underline=1,
                             accelerator="Ctrl+Q",
                             command=lambda: phonebook_func.ask_quit(self))
        menubar.add_cascade(label="File", underline=0, menu=filemenu)
        helpmenu = Menu(
            menubar, tearoff=0
        )  # defines the particular drop down colum and tearoff=0 means do not separate from menubar
        helpmenu.add_separator()
        helpmenu.add_command(label="How to use this program")
        helpmenu.add_separator()
        helpmenu.add_command(
            label="About This Phonebook Demo"
        )  # add_command is a child menubar item of the add_cascde parent item
        menubar.add_cascade(
            label="Help", menu=helpmenu
        )  # add_cascade is a parent menubar item (visible heading)
        """
            Finally, we apply the config method of the widget to display the menu
            From here we could also pass in additional aprams for additional 
            functionalityor appearances such as a borderwidth.
        """
        self.master.config(menu=menubar, borderwidth='1')
Beispiel #12
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # define our master frame configuration
        self.master = master
        self.master.minsize(500, 300)  #(Height, Width)
        self.master.maxsize(500, 300)
        # This CenterWindow method will center our app on the user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # load in the GUI widgets from a separate module,
        # keeping your code compartmentalizd and clutter free
        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs) :
        Frame.__init__(self, master, *args, **kwargs)

        # Defines master config:
        self.master = master
        self.master.minsize(500,300) # (height,width)
        self.master.maxsize(500,300)
        # CenterWindow method centers app on user's screen:
        phonebook_func.center_window(self,500,300)
        self.master.title("The Tkinter Phonebook Demo")
        self.master.configure(bg="F0F0F0")
        # Built-in Tkinter protocol method to catch if user clicks upper corner, "X" on Windows OS.
        self.master.protocol("WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # Loading GUI widgets from a sperate module to keep code comparmentalized and clutter free
        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        #   define the master frame configuation
        self.master = master
        self.master.minsize(500, 350)  # (Height, Width)
        self.master.maxsize(500, 350)
        #   This CenterWindow method will center the app on the user's screen
        phonebook_func.center_window(self, 500, 350)
        self.master.title("The Tkinter Phonebook App")
        self.master.config(bg="#F0F0F0")
        #   This protocol method is a tkinter built-in method to catch if
        #   the user clicks the upper corner, "X" on Windows OS.
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        #   Load in the GUI widgets from a separate module,
        #   keeping your code comparmentalized and clutter free
        phonebook_gui.load_gui(self)

        # Instantiate the Tkinter menu dropdown object
        # This is the menu that will appear at the top of our window
        menubar = Menu(self.master)
        filemenu = Menu(menubar, tearoff=0)
        filemenu.add_separator()
        filemenu.add_command(label="Exit",
                             underline=1,
                             accelerator="Ctrl+Q",
                             command=lambda: phonebook_func.ask_quit(self))
        menubar.add_cascade(label="File", underline=0, menu=filemenu)
        helpmenu = Menu(
            menubar, tearoff=0
        )  # defines the particular drop down colum and tearoff=0 means do not separate from menubar
        helpmenu.add_separator()
        helpmenu.add_command(label="How to use this program")
        helpmenu.add_separator()
        helpmenu.add_command(
            label="About This Phonebook App"
        )  # add_command is a child menubar item of the add_cascde parent item
        menubar.add_cascade(
            label="Help", menu=helpmenu
        )  # add_cascade is a parent menubar item (visible heading)

        self.master.config(menu=menubar, borderwidth='1')
Beispiel #15
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        #define the master frame config
        self.master = master
        self.master.minsize(500, 300)  #height, width
        self.master.maxsize(500, 300)
        phonebook_func.center_window(
            self, 500, 300
        )  #center_window will center the GUI window in the center of the screen
        self.master.title('The Tkinter Phonebook')
        self.master.configure(bg='white')  #bg = background
        #WM_DELETE_WINDOW is 'X' in upper corner of window that closes window
        self.master.protocol('WM_DELETE_WINDOW',
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master
        phonebook_gui.load_gui(
            self)  #calls the load_gui function from the phonebook_gui file
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        #define master frame config
        self.master = master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)
        #center app on user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title("The Tkinter Phonebook Drill")
        self.master.configure(bg='#f0f0f0')
        #exit window
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # load gui widgets
        phonebook_gui.load_gui(self)
Beispiel #17
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # define master frame configuration
        self.master = master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)
        # center app on user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title('The Tkinter Phonebook Demo')
        self.master.configure(bg="white")
        # built in method to catch if the close button is clicked
        self.master.protocol('WM_DELETE_WINDOW',
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # load in gui widgets from our other module
        phonebook_gui.load_gui(self)
Beispiel #18
0
    def __init__(self, master, *args, **kwargs):

        #define our master frame configuration
        self.master = master
        self.master.minsize(500, 300)  #height, width
        self.master.maxsize(500, 300)
        #This centerWindow method will center our app on the user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title("The Tkinter Phonebook Demo")
        self.master.configure(bg='#f0f0f0')
        #This protocol method is a tkinter built-in method to catch if
        #the user clicks the upper corner, "X" on WIndows OS.
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))

        #load in the GUI widgets from a separate module,
        #keeping your code compartmentalized and clutter free
        phonebook_gui.load_gui(self)
Beispiel #19
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        #define our master frame config
        self.master = master
        self.master.minsize(640,400) # W and H
        self.master.maxsize(640,400)
        # This Center Window method will center our app on the user's screen
        phonebook_func.center_window(self, 640, 400)
        self.master.title("The Tkinter PHonebook Demo")
        self.master.configure(bg="#F0F0F0")
        # This protocol method is a tkinter built-in method to catch if
        # the user clicks the upper corner, "X" on Windows OS
        self.master.protocol("WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self))

        # Load in the GUI widgets from a separate module,
        # keeping your code compartmentalized and clutter free
        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.master = master
        self.master.title("Tkinter Phonebook")
        self.master.configure(bg="#F0F0F0")

        # Sets max / min size of window to same to jebait people.
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)

        # Center the screen
        phonebook_func.center_window(self, 500, 300)

        # When the user clicks the X, a window will show up to ask them to confirm.
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))

        phonebook_gui.load_gui(self)
Beispiel #21
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # This defines the master frame
        self.master = master
        self.master.minsize(500,300) #(Height,Width)
        self.master.maxsize(500,300)

        # This center window will center our app on the user's screen
        phonebook_func.center_window(self,500,300)
        self.master.title("The Tkinter Phonebook Demo")
        self.master.configure(bg="slategray")

        # This protocol method is a tkinter buit-in method to catch if 
        # the user clicks the upper corner, "X" on window OS
        self.master.protocol("WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self))

        # load in the gui widgets from a seperate module
        phonebook_gui.load_gui(self)
Beispiel #22
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # Define our master frame configuration
        self.master = master
        self.master.minsize(500, 300)  # (Height, Width)
        self.master.maxsize(500, 300)
        # CenterWindow method that will center app on user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title('Our Tkinter Phonebook Demo')
        self.master.configure(bg='#F0F0F0')
        # This protocol method is a built-in tkinter method to catch if
        #  the user clicks the upper corner, 'X' in Windows OS.
        self.master.protocol('WM_DELETE_WINDOW',
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # Load in GUI widgets from separate module
        phonebook_gui.load_gui(self)
Beispiel #23
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # define master frame configuration
        self.master = master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)

        # center app on user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title("Phonebook")
        self.master.configure(bg='#F0F0F0')

        # if user Xs out
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))

        # load GUI widgets from separate module
        phonebook_gui.load_gui(self)
Beispiel #24
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # defining our master frame configuration that we invoked above
        self.master = master
        self.master.minsize(
            500, 300)  # locking the (height, width) so it cannot be resized
        self.master.maxsize(500, 300)

        # This CenterWindow method will center our app on the user's screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title("Tkinter Phonebook Demo")
        self.master.configure(bg="#F0F0F0")

        # this protocol method is a tkinter built-in method used to catch if the user clicks the upper right corner "X"
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # load in the GUI widgets from a seperate module to keep code organized
        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs):  #define class with self
        Frame.__init__(self, master, *args, **kwargs)

        #define master frame config
        self.master = master  #master level frame
        self.master.minsize(500, 300)  #height , width
        self.master.maxsize(500,
                            300)  # self is always refering to parent window
        phonebook_func.center_window(
            self, 500, 300
        )  #reference to outer script, already imported at top. always center in user screen.
        #you have to pass in self as a key.
        self.master.title("The Tinkter Phonebook Demo"
                          )  #the eveything frame will be titled...
        self.master.configure(bg="maroon")
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(
                                 self))  #rule for master designated by windows
        arg = self.master

        phonebook_gui.load_gui(self)  #loading expansive widgets
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # define the master frame configuration
        self.master = master
        self.master.minsize(500, 300)  # height/width
        self.master.maxsize(500, 300)

        # Center window method will center the app on the users screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title("The Tkinter Phonebook Demo")
        self.master.configure(bg="#F0F0F0")

        # This protocol method is as tkinter built-in method to catch if
        # the user clicks the upper corner "X" in Windows
        self.master.protocol("WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # load in GUI widgets from a separate module,
        # keeping your code compartmentalized and clutter free
        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        # Define our masterframe configuration
        self.master = master
        self.master.minsize(550, 400)
        self.master.maxsize(550, 400)

        # This CenterWindow will center our App on the screen
        phonebook_func.center_window(self, 500, 300)
        self.master.title("Tkinter Phonebook")
        self.master.configure(bg='#F0F0F0')

        # This protocol method is a builtin Tkinter method to catch if
        # the user clicks on the upper corner 'x' on the windows OS
        self.master.protocol("WM_DELETE_WINDOW",
                             lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # Load in the GUI widgets from a seperate module,
        # Keeping your code compartmentalized and clutter free
        phonebook_gui.load_gui(self)
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)#I DON'T UNDERSTAND THIS CODE

        # define our master frame configuration (self.master is the parentwindow frame)
        self.master = master
        self.master.minsize(500,300) #(Height, Width)
        self.master.maxsize(500,300)
        # This CenterWindow method from phonebook_func will center our app on the user's screen
        phonebook_func.center_window(self,500,300)
        self.master.title("The Tkinter Phonebook")
        self.master.configure(bg="#F0F0F0")
        # This protocol method is a tkinter built-in method to catch if 
        # the user clicks the upper corner, "X" on Windows OS.
        self.master.protocol("WM_DELETE_WINDOW", lambda: phonebook_func.ask_quit(self))
        arg = self.master

        # load in the GUI widgets from a separate module, 
        # keeping your code comparmentalized and clutter free
        phonebook_gui.load_gui(self)
        
        # Instantiate the Tkinter menu dropdown object
        # This is the menu that will appear at the top of our window
        menubar = Menu(self.master)
        filemenu = Menu(menubar, tearoff=0)
        filemenu.add_separator()
        filemenu.add_command(label="Exit", underline=1,accelerator="Ctrl+Q",command=lambda: drill50_phonebook_func.ask_quit(self))
        menubar.add_cascade(label="File", underline=0, menu=filemenu)
        helpmenu = Menu(menubar, tearoff=0) # defines the particular drop down colum and tearoff=0 means do not separate from menubar
        helpmenu.add_separator()
        helpmenu.add_command(label="How to use this program")
        helpmenu.add_separator()
        helpmenu.add_command(label="About This Phonebook Demo") # add_command is a child menubar item of the add_cascde parent item
        menubar.add_cascade(label="Help", menu=helpmenu) # add_cascade is a parent menubar item (visible heading)
        """
            Finally, we apply the config method of the widget to display the menu
            From here we could also pass in additional aprams for additional 
            functionalityor appearances such as a borderwidth.
        """
        self.master.config(menu=menubar, borderwidth='1')