Closed infiniteTesch closed 2 months ago
I made it work by using the .get() function instead of selection_option like so: def on_listbox_select(self, selected_option):
In this case i got VirtualEvent event x=0 y=0 as value for selected_option on click.
@infiniteTesch <<ListboxSelect>>
is only a trigger event which doesn't return/pass any value, you have to use .get()
method in the function with this.
Got this error after the last update when trying to click on items in my listbox which is popualated with basic string references to .txt files. Neither .activate() or regular select works.
C:\noyb\projects\studd\lists\.txt Sort
File not found: C:\noyb\projects\studd\lists\.txt
Error opening file: [Errno 22] Invalid argument: 'C:\noyb\projects\studd\lists\.txt'
self.listbox = EditorListbox(self.bottom_frame, command=self.on_listbox_select)
class EditorListbox(CTkListbox): def init(self, master, command=None, **kwargs)