Next / Previous / Contents / Shipman's homepage

4.3. Application.__createWidgets(): Widget layout

There are only two widgets: the ScrolledList widget we are testing, and a quit button below it.

scrolledlisttest
    def __createWidgets(self):
        """Lay out the widgets.
        """
        self.sbox = scrolledlist.ScrolledList(self,
            width=20, height=10, hscroll=1,
            callback=self.__pickHandler)
        self.sbox.grid(row=0, column=0)

        self.quitButton = Button(self, text="Quit",
            command=self.quit)
        self.quitButton.grid(row=1, column=0, columnspan=99,
            sticky=E+W, ipadx=5, ipady=5)