user1816467
user1816467

Reputation:

Make a listbox bigger than default?

I'm just wondering how to make a listbox bigger than the original size it enters as.

It's probably simple but I cant find how to do it.

My code is below:

frame_1 = Frame(myGUI)
frame_1.place(x=75, y=300)
scrollbar = Scrollbar(frame_1)
scrollbar.pack(side=RIGHT, fill=Y)
listbox_1 = Listbox(frame_1, yscrollcommand=scrollbar.set)
listbox_1.pack()
scrollbar.config(command=listbox_1.yview)

Upvotes: 0

Views: 2347

Answers (2)

zosan
zosan

Reputation: 9

Or just when you are setting up the list the first time you can set the height and width then.

Upvotes: 0

jeffknupp
jeffknupp

Reputation: 6254

You should be able to change it just by setting the appropriate value for listbox_1, i.e.:

listbox_1['height'] = something
listbox_1['width'] = something_else

Or, by using the config method:

listbox_1.config(width=100, height=200)

Upvotes: 2

Related Questions