[Tutor] ttk menubutton
Alan Gauld
alan.gauld at yahoo.co.uk
Wed Apr 12 20:19:08 EDT 2023
On 12/04/2023 23:56, Phil wrote:
>> What is menu_button?
>
> Unless I'm mistaken, there are two similar ttk widgets, a menubutton and
Yes but my point was that you were using menu_button in your
code as a name (not a widget) in the bind call, but you had
not created any such variable. Normally that would result in
a NameError but if such a name existed in the module (maybe
you had (foolishly) used, say, from ttk import * ) then
there would be no helpful error message, just your code
would break.
> My AI friend had made many suggestions that didn't work and that was one.
If you are trying to use an AI tool like chatGPT to get code then good
luck! I've tried it several times and it has never, not once, produced
actual code that works. Nothing beats actually knowing what you are
doing yourself.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list