[Tutor] Adding label to listbox

alan.gauld@bt.com alan.gauld@bt.com
Thu Feb 27 06:44:01 2003


I have successfully created a listbox with a scrollbar,
but now I want to add a label to precede it and explain
what is being selected. Does this have to be a separate
label or can it be packed into the Listbox somehow.

I'd probably put the label and listbox/scrollbar into a 
frame each then pack both of those into a single frame. 
I might even bundle all of that together as a LabelledListBox 
class...

In fact I'd probably create a ListBox module with two classes 
- one unlabelled listbox with Scrollbar - ScrollingList
- one labelled scrolling list - LabelScrollingList

And maybe even a third:
- one labelled list box without scrolling - LabelledList

That gives me nice reuse options for the future.

Alan g.