Friday, July 22, 2022

Lesson 8

 Working with a listbox gadget, in this lesson. Starting from a 5 item

menu, I added one more - the cheesecake - and deleted three: the pizza, pasta and

garlic bread, before submitting my selection. My order is then confirmed at

the terminal window.

                                                             


                                                                               






                                                                             

I already know how to set-up a tkinter window from previous examples. The new

material here is how the listbox is configured and what the functiom code does.


The listbox is one wideg, it is given a frame and a paper-colored background, and an

entrybox is added. listbox.size() - ie height - is reconfigured after every function and is set

to the length of the list. 'getindex()' gives access to the foodlist list items. 'curselection( )' means current 

selection of items. listbox.size() returns the number of lines in the listbox.

No comments: