Cecil Westerhof <
Ce...@decebal.nl> wrote:
> Rich <ri...@example.invalid> writes:
>
>> The first thing I see is that you have not informed 'grid' as to how
>> you want the rows/columns in the grid to expand/contract in response
>> to size changes (grid's default is to not change size after initial
>> update).
>>
>> Look into the -weight option to the rowconfigure and columnconfigure
>> options to the grid manager.
>>
>> As to why it waits until you move to the other monitor before things
>> 'lock', that I don't know why at the moment (onl have one monitor
>> here right now, so could not test a two monitor setup if I wanted to
>> do so).
>>
>> It is possible that adding a -weight to tell grid how to reapportion
>> space for expand/contract might fix the issue for the second
>> monitor.
>
> Nope, the code below gives the same problem:
[long code block snipped.]
I generally put my 'columnconfigure' and 'rowconfigure' calls after I
pack widgets into the grid. I don't know if it really makes a
difference, but doing so 'after' guarantees the rows and/or columns do
in fact exist before trying to configure them.
> With:
> wm resizable . 0 0
>
> There is no problem.
Meaning the window resizes when the font changes?
If turning off the ability to interactively resize results in an
auto-resize then this implies a weird interaction with whatever window
manager is running on your system. In which case the lack of resize
when moved to the other monitor may not be Tk's fault or even under the
app's control.
> That would work in this case (there is no reason to resize), but
> certainly not in all cases.
Yes.
I'll be able to test later (although I'll have to edit your script, as
what you posted won't run for me on my system without removing the
specifics to your system) on two monitors, but one of them is not a
high-dpi monitor, so it won't be a perfect test.