[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-24 Thread DDavid


DDavid  added the comment:

Thanks for your help! I agree that it is probably a Tk issue. I will contact 
them and back with more information.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with E. Paine that you should use pack(fill="x") if you want to 
stretch a widget. And in any case Tkinter itself does not manage layout, it is 
just a wrapper around Tk, so if you think that the default layout of a button 
is wrong on some platforms, you should report it to the Tk team.

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This should likely be closed as 3rd party

 zjdavid Which python release, which macOS, which installer, which tk 
patchlevel?  (IDLE Help=>About displays it).

At least one of the 3.9.1 python.org mac installers installs 8.6.10.  We cannot 
be responsible for problems fixed in this release.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-21 Thread E. Paine


E. Paine  added the comment:

I suspect this is just a MacOS behaviour, if not then it is a Tk bug. If you 
really need to enforce the width, you could tell it to expand horizontally in 
the layout. An example of this would be as follows:

tk.Frame(root, height=1, width=300).pack()
tk.OptionMenu(root, tk.StringVar(), "test").pack(fill="x")

A bit more detail on the Tk side of things:
tkinter doesn't actually use `tk_optionMenu` and instead creates its own 
menubutton and menu. The issue with the menubutton width not changing also 
exists when working directly with Tk (`pack [menubutton .p -width 100]`). 
However, the same behaviour can be shown when using `tk_optionMenu`, so 
changing tkinter to use that instead would not fix this issue.

--
nosy: +epaine, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-20 Thread DDavid


New submission from DDavid :

Hello,

I am building a program with Tkinter. However, I found the Optionmenu widget 
has inconsistent behaviors on default lengths on a Mac and a Windows PC. 

So I set the width of an optionmenu through menu.configure(width=70). On 
Windows, this correctly sets the menu width to 70 when the program runs. 
However, on a Mac, the menu is still very narrow at the start. It only expands 
to 70 after I select an option. 

I have attached a screenshot to help explain the issue. It does not occur on 
Windows.

--
components: Tkinter
files: TKinter Menu issue.png
messages: 385345
nosy: zjdavid
priority: normal
severity: normal
status: open
title: Tkinter Optionmenu Too Narrow on Mac
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file49752/TKinter Menu issue.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com