Python Forum

Full Version: PysimpleGUI - listbox with list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,

I'm after a listbox which will display the contents of a list - eg

id = [1,2,3,4,5]

the listbox would look like:

_______
1
2
3
4
5_____

Thanks,
James
import PySimpleGUI as psg

nums = range(1, 11)

layout = [
[psg.Listbox(values=nums, size=(30, 10))]
]

win = psg.Window('Some Text', layout,).read()
You are an absolute legend.

Thank you so much.

Cheers,
Jamie