Tkinter menu item underline syntax [RESOLVED]

Rich Shepard rshepard at appl-ecosys.com
Wed Jan 6 15:42:36 EST 2021


On Wed, 6 Jan 2021, 2QdxY4RzWzUUiLuE at potatochowder.com wrote:

> For the sake of future generations who may run into this issue, can you
> post the complete, correct call to file_menu.add_command?

This is the working version of the stanza I initially posted:

 	file_menu.add_command(
             label = 'New',
             command = self.callbacks['file->new', underline: 0],
             accelerator = 'Ctrl+N'
         )

The label line separated from the command with a comma. The underline option
is a key and separated from its value with a colon.

HTH,

Rich


More information about the Python-list mailing list