The Application Window


The next example program simply pops up an empty window.  The window has a title and an initial width of 300 pixels and a height of 150 pixels.




from breezypythongui import EasyFrame


class EmptyWindow(EasyFrame):


    def __init__(self):

        EasyFrame.__init__(self, title = "An Empty Window",

                           width = 300, height = 150)





This program simply gives the user a window that she can zoom, minimize, resize, or close.  Note that the window’s title and dimensions are passed as arguments to the __init__ method in EasyFrame.   These arguments are optional but are recommended.  The argument keywords are included for clarity.  The default title is the empty string.  If dimensions are not provided, Python shrink-wraps the window around the window components, if there are any.  Because there are no window components in this program, no event handling methods are included.