Re: RE: Problem resizing a window and button placement

2024-02-27 Thread Alan Gauld via Python-list
On 27/02/2024 07:13, Steve GS via Python-list wrote: > Aside from using it to resized > the window, is there no way to > know the last value of the > change for use in the program? The last value would be the current width. And you know how to get that as shown in your configure function: Ww =

RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
at be done? SGA -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Monday, February 26, 2024 8:34 AM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2/26/2024 6:02 AM, Steve GS via Python-list wrote: > Althou

Re: Problem resizing a window and button placement

2024-02-26 Thread Thomas Passin via Python-list
SGA -Original Message- From: Alan Gauld Sent: Monday, February 26, 2024 4:04 AM To: Steve GS ; python-list@python.org Subject: Re: RE: Problem resizing a window and button placement On 26/02/2024 07:56, Steve GS via Python-list wrote: Then there is that discovery element: Why is my o

Re: RE: RE: Problem resizing a window and button placement

2024-02-26 Thread Alan Gauld via Python-list
On 26/02/2024 11:02, Steve GS via Python-list wrote: > Although your code produces the value of Ww outside the function, > I do not see how I can use the value of Ww unless I close the program. You have to use a function that operates inside the mainloop. Thats the nature of event driven

RE: RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
an I have concentric loops? SGA -Original Message- From: Alan Gauld Sent: Monday, February 26, 2024 4:04 AM To: Steve GS ; python-list@python.org Subject: Re: RE: Problem resizing a window and button placement On 26/02/2024 07:56, Steve GS via Python-list wrote: > Then ther

Re: RE: Problem resizing a window and button placement

2024-02-26 Thread Alan Gauld via Python-list
On 26/02/2024 07:56, Steve GS via Python-list wrote: > Then there is that discovery > element: Why is my original > idea not working? I still > cannot pass the value back > from the function. What is > different about this function > that others would have given > me the value? There is nothing

RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
, February 25, 2024 5:55 PM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2/25/2024 4:19 PM, Steve GS via Python-list wrote: > SOLUTION FOUND! > > The fix was to write the code that uses the width value and to place it into the function itself

RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
org Subject: Re: Problem resizing a window and button placement On 2024-02-25 21:19, Steve GS via Python-list wrote: > SOLUTION FOUND! > > The fix was to write the code that uses the width value and to place it into the function itself. > Kluge? Maybe

Re: Problem resizing a window and button placement

2024-02-25 Thread MRAB via Python-list
On 2024-02-25 21:19, Steve GS via Python-list wrote: SOLUTION FOUND! The fix was to write the code that uses the width value and to place it into the function itself. Kluge? Maybe but it works. Mischief Managed. As for the most recent suggestion, it fails for me:

Re: Problem resizing a window and button placement

2024-02-25 Thread Thomas Passin via Python-list
in the function used here, and make it available to the code outside the function. SGA -Original Message- From: Alan Gauld Sent: Sunday, February 25, 2024 12:44 PM To: Steve GS ; python-list@python.org Subject: Re: RE: Problem resizing a window and button placement On 25/02/2024 03:58, Ste

RE: RE: Problem resizing a window and button placement

2024-02-25 Thread Steve GS via Python-list
python-list@python.org Subject: Re: RE: Problem resizing a window and button placement On 25/02/2024 03:58, Steve GS via Python-list wrote: import tkinter as tk Ww = None def on_configure(*args): global Ww Ww = root.winfo_width() print("Ww Inside = <" + str(W

Re: RE: Problem resizing a window and button placement

2024-02-25 Thread Alan Gauld via Python-list
On 25/02/2024 03:58, Steve GS via Python-list wrote: import tkinter as tk Ww = None def on_configure(*args): global Ww Ww = root.winfo_width() print("Ww Inside = <" + str(Ww) + ">") root = tk.Tk() root.bind('', on_configure) root.mainloop() print("Ww Outside = <" + str(Ww)

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
So, how do I use the width value in my code? SGA -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Saturday, February 24, 2024 10:36 PM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2024-02-25 02:51, Steve GS wrote

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
uld call other functions that do. That's if you don't let a layout do it all for you, as others have written. > root.mainloop() > > SGA > > -Original Message- > From: Python-list > sga.ni...@python.org> On > Behalf Of MRAB via Python-list > Sent: Saturday, Februa

Re: Problem resizing a window and button placement

2024-02-24 Thread MRAB via Python-list
On 2024-02-25 02:51, Steve GS wrote: import tkinter as tk #global Ww Neither global helps def on_configure(*args): # print(args) #global Ww Neither global helps Ww = root.winfo_width() print("WwInside = <" + str(Ww) + ">") root = tk.Tk() root.bind('', on_configure)

Re: Problem resizing a window and button placement

2024-02-24 Thread Thomas Passin via Python-list
oot.mainloop() SGA -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Saturday, February 24, 2024 7:49 PM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2024-02-25 00:33, Steve GS via Python-list wrote: "Well, yes,

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
t("WwOutside = <" + str(Ww) + ">") #NameError: name 'Ww' is not defined root.mainloop() SGA -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Saturday, February 24, 2024 7:49 PM To: python-list@python.org Subject: Re: Problem resizing a window and

Re: Problem resizing a window and button placement

2024-02-24 Thread MRAB via Python-list
On 2024-02-25 00:33, Steve GS via Python-list wrote: "Well, yes, in Python a variable created inside a function or method is local to that function unless you declare it global." Yes, I knew that. I tried to global it both before the function call and within it. Same for when I created the

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
via Python-list Sent: Saturday, February 24, 2024 8:40 AM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2/24/2024 3:20 AM, Steve GS via Python-list wrote: > Yes, I ran that elegantly > simple code. The print > statement reports the X, Y, > H

Re: Problem resizing a window and button placement

2024-02-24 Thread Grant Edwards via Python-list
On 2024-02-24, MRAB via Python-list wrote: > On 2024-02-24 01:14, Steve GS via Python-list wrote: > >> Python, Tkinter: How do I determine if a window has been resized? I >> want to locate buttons vertically along the right border and need >> to know the new width. The buttons are to move with

Re: Problem resizing a window and button placement

2024-02-24 Thread Thomas Passin via Python-list
ry between languages. So close.. SGA -Original Message- From: Barry Sent: Saturday, February 24, 2024 3:04 AM To: Steve GS Cc: MRAB ; python-list@python.org Subject: Re: Problem resizing a window and button placement On 24 Feb 2024, at 04:36, Steve GS via Python-list wrote:

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
Cc: MRAB ; python-list@python.org Subject: Re: Problem resizing a window and button placement > On 24 Feb 2024, at 04:36, Steve GS via Python-list wrote: > > How do I extract the values > from args? You can look up the args in documentation. You can run the example code MRAB prov

Re: Problem resizing a window and button placement

2024-02-24 Thread Barry via Python-list
> On 24 Feb 2024, at 04:36, Steve GS via Python-list > wrote: > > How do I extract the values > from args? You can look up the args in documentation. You can run the example code MRAB provided and see what is printed to learn what is in the args. Barry --

RE: Problem resizing a window and button placement

2024-02-23 Thread Steve GS via Python-list
How do I extract the values from args? SGA -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Friday, February 23, 2024 9:27 PM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2024-02-24 01:14, Steve GS via Python-list

Re: Problem resizing a window and button placement

2024-02-23 Thread MRAB via Python-list
On 2024-02-24 01:14, Steve GS via Python-list wrote: Python, Tkinter: How do I determine if a window has been resized? I want to locate buttons vertically along the right border and need to know the new width. The buttons are to move with the change of location of the right-side border. Bind

Problem resizing a window and button placement

2024-02-23 Thread Steve GS via Python-list
Python, Tkinter: How do I determine if a window has been resized? I want to locate buttons vertically along the right border and need to know the new width. The buttons are to move with the change of location of the right-side border. SGA --