Author louielu
Recipients Frank Pae, louielu, serhiy.storchaka, terry.reedy
Date 2017-04-29.07:43:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493451836.03.0.157965909319.issue30200@psf.upfronthosting.co.za>
In-reply-to
Content
This behavior is as same as on my Linux Python 2.7.13:


(<Tkinter.Listbox instance at 0x7f4b2b0c08c0>, (2,)) # Select Font
(<Tkinter.Listbox instance at 0x7f4b29caf248>, (3,)) # Select Style
(<Tkinter.Listbox instance at 0x7f4b2b0c08c0>, ())   # Deselect Font


And also, you don't need a try expect to handle this situation. You can see that when de-select the listbox, curselection() will return an empty tuple, you only need an if statement to handle this:

    def get_style(event):
        lb_sty_cur = event.widget.curselection()
        if lb_sty_cur:
            lb_sty_get = listbox_style.get(lb_sty_cur)
            self.style.set(lb_sty_get)
        return
History
Date User Action Args
2017-04-29 07:43:56louielusetrecipients: + louielu, terry.reedy, serhiy.storchaka, Frank Pae
2017-04-29 07:43:56louielusetmessageid: <1493451836.03.0.157965909319.issue30200@psf.upfronthosting.co.za>
2017-04-29 07:43:56louielulinkissue30200 messages
2017-04-29 07:43:55louielucreate