Python Forum
[Tkinter] Listbox data
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Listbox data
#3
Yes, true, my list is a list of list, or two-dimensional array.
The fact is that when I use listbox.get(start,end) it runs perfectly as alist (or array).
only in listbox.selection_get I get the error.
I can work-around to modify the outcome to look like a list by:

outdatalist = '[[' + listbox.selection_get().replace('\n','],[').replace(' ',',') + ']]'

which will make the output look like a list: Selection_Get= [[0,66,42],[553,68,124],[1106,64,3]], but it still does not behave like a list and does not recognize the records as integers.
listbox.get is intended to capture all data, while listbox.selection_get is for capturing only selected records. They should have the same output.
To me, the fact that listbox.get is ok while listbox.selection_get is in error, looks like a bug.
I will try the treeview and see if it works for me.
Reply


Messages In This Thread
Listbox data - by samtal - Oct-18-2018, 08:01 AM
RE: Listbox data - by Larz60+ - Oct-18-2018, 08:29 AM
RE: Listbox data - by samtal - Oct-18-2018, 11:40 AM
RE: Listbox data - by Larz60+ - Oct-18-2018, 01:53 PM
RE: Listbox data - by samtal - Oct-18-2018, 03:19 PM
RE: Listbox data - by Larz60+ - Oct-18-2018, 03:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Button to add data to database and listbox SalsaBeanDip 1 2,935 Dec-06-2020, 10:13 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020