introduction to gui programming scrollbar tkinter scrollbar(frameorient=tkinter verticalself listbox tkinter listbox(frameyscrollcommand=scrollbar setself listbox grid(row= column= sticky=tkinter nsewself listbox focus_set(scrollbar["command"self listbox yview scrollbar grid(row= column= sticky=tkinter nsself statusbar tkinter label(frametext="ready "anchor=tkinter wself statusbar after( self clearstatusbarself statusbar grid(row= column= columnspan= sticky=tkinter ewframe grid(row= column= sticky=tkinter nsewthe main window' central area (the area between the toolbar and the status baris occupied by list box and an associated scrollbar the list box is laid out to be sticky in all directionsand the scrollbar is sticky only north and south (verticallyboth widgets are added to the window frame' gridside by side we must ensure that if the user scrolls the list box by tabbing into it and using the up and down arrow keysor if they scroll the scrollbarboth widgets are kept in sync this is achieved by setting the list box' yscrollcommand to the scrollbar' set(method (so that user navigation in the list box results in the scrollbar being moved if necessary)and by setting the scrollbar' command to the listbox' yview(method (so that scrollbar movements result in the list box being moved correspondinglythe status bar is just label the after(method is single shot timer ( timer that times out once after the given intervalwhose first argument is timeout in milliseconds and whose second argument is function or method to call when the timeout is reached this means that when the program starts up the status bar will show the text "ready for five secondsand then the status bar will be cleared the status bar is laid out as the last row and is made sticky west and east (horizontallyat the end we lay out the window' frame itself we have now completed the creation and layout of the main window' widgetsbut as things stand the widgets will assume fixed default sizeand if the window is resized the widgets will not change size to shrink or grow to fit the next piece of code solves this problem and completes the initializer frame columnconfigure( weight= frame columnconfigure( weight= frame rowconfigure( weight= frame rowconfigure( weight= frame rowconfigure( weight=