> 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
Yes, I ran that elegantly
simple code. The print
statement reports the X, Y,
Height and Width values.
However, I do not see how to
capture the width value.
I experimented with the code
Vwidth = rootV.winfo_width()
and it also reports the width
as I resize the window.
However, I cannot seem to
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,
Height and Width values.
However, I do not see how to
capture the width value.
I experimented with the code
Vwidth = rootV.winfo_width()
and it also reports the wi
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
"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
variable. If I try to use it
in the rest of the code, it
kee
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
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("WwOutside = <" +
str(Ww) + ">")
#NameErr
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
#global Ww Neither global
helps
def on
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
The print statement in the
function prints.
Does that not mean that the
function is being called?
SGA
-Original Message-
From: Python-list
On
Behalf Of Thomas Passin via
Python-list
Sent: Saturday, February 24,
2024 10:39 PM
To: python-list@python.org
Subject: Re: Problem resizing
a w
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:
11 matches
Mail list logo