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 = r
de
your handler.
How would that 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
t;")
# Can 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
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 programs
quot;)
# Can 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:
> Th
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
unday, 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 i
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 but it works.
>
> Mischief Manag
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:
Tra
ted 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
Steve GS ; 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 = <&quo
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)
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
window and button placement
On 2/24/2024 9:51 PM, Steve GS
via Python-list wrote:
First of all, please make sure
that the formatting is
readable and especially the
indentation. This is Python,
after all.
Do not use tabs; use 3 or 4
spaces instead of each tab.
> import tkinter as tk
>
>
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)
print
r you, as others have written.
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 button placement
On 2024-02-25 00:33, Steve GS
via Pyth
gure)
print("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 r
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
varia
as Passin 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,
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 the
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:
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
> 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
--
https://mail.python.org/mailman
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
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 an
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
--
https://mail.python.org/mailman/listinfo/p
On 2021-03-09, Terry Reedy wrote:
>
> Say more clearly what you want/expect and what you are getting and why
> you are unhappy.
>
It solved Terry, I wanted center the button on top, had only 3 columns
(0,1,2) and was unaware that I could use "columnspan=3" as it ends on 2,
I was using columnspan
On 2021-03-09, Richard Damon wrote:
>
> One thing to remember is that span is sort of like range, range(3) is
> [0, 1, 2]
>
Right, ends on 2. Thanks again, that ended mine frustration lol.
--
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
On 3/9/21 6:24 AM, Bischoop wrote:
> On 2021-03-09, Peter Otten <__pete...@web.de> wrote:
>> On 09/03/2021 03:08, Bischoop wrote:
>>> I try for a while place the top button in a a middle of column=0 with
>>> span to column2 below so the button being centered to those,
>> I'm not sure what you mean
On 2021-03-09, Peter Otten <__pete...@web.de> wrote:
> On 09/03/2021 03:08, Bischoop wrote:
>>
>> I try for a while place the top button in a a middle of column=0 with
>> span to column2 below so the button being centered to those,
>
> I'm not sure what you mean, do you perhaps need columnspan=3?
On 3/8/2021 9:08 PM, Bischoop wrote:
I try for a while place the top button in a a middle of column=0 with
span to column2 below so the button being centered to those, tried with
canvas as well but with no success. Is someone with Tkinter experience
able to advice what I could do?
Say more cle
On 09/03/2021 03:08, Bischoop wrote:
I try for a while place the top button in a a middle of column=0 with
span to column2 below so the button being centered to those,
I'm not sure what you mean, do you perhaps need columnspan=3?
tried with
canvas as well but with no success. Is someone wit
I try for a while place the top button in a a middle of column=0 with
span to column2 below so the button being centered to those, tried with
canvas as well but with no success. Is someone with Tkinter experience
able to advice what I could do?
from tkinter import *
from tkinter import ttk
root
33 matches
Mail list logo