Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Linux: the choice of a GNU generation -- ksh@cis.ufl.edu put this on Tshirts in '93


devel / comp.lang.python / Re: Problem resizing a window and button placement

SubjectAuthor
o Re: Problem resizing a window and button placementThomas Passin

1
Re: Problem resizing a window and button placement

<mailman.16.1708901723.3452.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=29549&group=comp.lang.python#29549

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: list1@tompassin.net (Thomas Passin)
Newsgroups: comp.lang.python
Subject: Re: Problem resizing a window and button placement
Date: Sun, 25 Feb 2024 17:55:12 -0500
Lines: 63
Message-ID: <mailman.16.1708901723.3452.python-list@python.org>
References: <06f101da66da$902357f0$b06a07d0$@SGA.Ninja>
<C72A9439-2300-4DCD-8A56-7C3AAE718EF4@barrys-emacs.org>
<070d01da66fa$5faea870$1f0bf950$@SGA.Ninja>
<31caf694-99fd-41ca-a98c-cb0d5d4a758e@tompassin.net>
<077801da6782$4f6046d0$ee20d470$@SGA.Ninja>
<13edcbad-1914-424c-97aa-3679eaf77fd8@mrabarnett.plus.com>
<07b101da6795$97d57df0$c78079d0$@SGA.Ninja>
<5d93173f-b172-408a-a052-c670214581b2@mrabarnett.plus.com>
<07c701da679e$d3a8a6f0$7af9f4d0$@SGA.Ninja>
<dd484037-16c8-b707-89f6-99f327207913@yahoo.co.uk>
<083301da6830$63224480$2966cd80$@SGA.Ninja>
<cd441398-c4d4-4d33-9df7-43163b1d856d@tompassin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de T1A2tEL64hOfBRoxKmj6mAnOmccmigLhO0QgNM7tNiIA==
Cancel-Lock: sha1:pYL8ASy52JrLL/9FYwIB2fsOb74= sha256:4Aqo0O7sJr4v9H743Jof+yyG4p9iMGRo7112aoanwQw=
Return-Path: <list1@tompassin.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=tompassin.net header.i=@tompassin.net header.b=SEz2nJqt;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.014
X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'def': 0.04; 'traceback':
0.04; '(most': 0.05; 'last):': 0.05; 'tkinter': 0.07; 'fails':
0.09; 'resizing': 0.09; 'suggestion,': 0.09; 'typeerror:': 0.09;
'import': 0.15; '"have': 0.16; '2024': 0.16; 'gauld': 0.16;
'received:10.0.0': 0.16; 'received:64.90': 0.16;
'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16;
'received:dreamhost.com': 0.16; 'variable,': 0.16; 'wrote:': 0.16;
'problem': 0.16; 'uses': 0.19; 'pm,': 0.19; 'to:addr:python-list':
0.20; 'maybe': 0.22; 'code': 0.23; 'skip:- 10': 0.25; 'perform':
0.26; 'function': 0.27; 'header:User-Agent:1': 0.30; 'program':
0.31; 'here,': 0.32; 'python-list': 0.32; 'received:10.0': 0.32;
'received:mailchannels.net': 0.32;
'received:relay.mailchannels.net': 0.32; 'right,': 0.32; 'window':
0.32; 'but': 0.32; 'header:In-Reply-To:1': 0.34; 'close': 0.35;
'fix': 0.36; 'file': 0.38; 'use': 0.39; 'steve': 0.39; 'wrote':
0.39; 'alan': 0.40; 'event': 0.40; 'skip:0 20': 0.61; 'skip:o 10':
0.61; 'from:': 0.62; 'to:': 0.62; '25,': 0.62; 'skip:o 20': 0.63;
'button': 0.64; 're:': 0.64; 'bad': 0.67; 'outside': 0.67;
'header:Received:6': 0.67; 'received:64': 0.67; 'adds': 0.69;
'interesting': 0.71; 'global': 0.73; 'sent:': 0.78; 'placement':
0.81; 'extra': 0.84; 'itself.': 0.84; 'responds': 0.84; 'me:':
0.91; 'width': 0.91
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1708901713; a=rsa-sha256;
cv=none;
b=PBCc1KKZyIYNhxcYyJ2cAuJbrXDiup+s/ZB+kdmevKSAFfB5dGEXtTIt8iMltFwrtl6f3W
9e3v/yCfl4CMPLplpUDEsXEelVzITH28A00eGqhyoeccX5mNo3DXDCk+T/Qaj1Psw9pIdo
IIuurrb05hBnTvSeTO9qTk7kbeSpz9a47RtFkfgREttqjdsIk3Et527kIUAExftzDBn/Si
NKm3zzU/Apq0U8SjoYFW1HsigLjcIDnuUu91uFnNSHqY82bZ0VijyrjZ2+3K54EpLSq5MW
tXmuidpv4hc2LXCS1tUEfXpgQYz67SGEucfKLXX/UAQN90OwHRFOyaqOYWGAFA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1708901713;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=3vg/tp0gcauzNiEbtd7FZs4mT3wxu5ToKLXtkOyWSaw=;
b=9aQdrTkxvw9dODeKZgW+7WbrFKKRLdQBtZCUnbYembtS77rK8vRbBygLv/t7PvKSxfA+mC
FN9jtu0+kaSNb4lPBKocdClQjTczTQMwK48bY2jwIVZ6AaGmyRb+Mf08RWZ6YtjJ/3HIYN
4I1w3SwVocy6wtpMyE2PJvBxYJ0BStxh88xDOPhTitHSIW+o2mzUFN8DlxB/d9j6H/mRrl
oZl9A1B0AM1WyuAiS3S/RbX323nAqsLH4BI1CUkYXrSX7JnhNEQxQ999CKbrOZwYNi+o3p
fAWDY1AtC0PgNe8wh6JOob7Qlrc611idhK+HYnSkempDMG8FmhWsUM71Fr7Pdg==
ARC-Authentication-Results: i=1; rspamd-6bdc45795d-vhbpb;
auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|tpassin@tompassin.net
X-MailChannels-Auth-Id: dreamhost
X-Arithmetic-Sponge: 661e8425627924f0_1708901714590_2588611291
X-MC-Loop-Signature: 1708901714589:4142482244
X-MC-Ingress-Time: 1708901714589
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
s=dreamhost; t=1708901713;
bh=3vg/tp0gcauzNiEbtd7FZs4mT3wxu5ToKLXtkOyWSaw=;
h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding;
b=SEz2nJqt1HtqB58+wlYw0pWzAyc8wlWlpSI5MKc1piMCimi64CvQNDtaTkQCvdqbt
e7HOGMa+u00jSyu4EaUYcLbWFPNlOaflBMNPn6att2peUIfnPF55X0gf6gCITvhmuo
ljUJGbdAsR/Zl1rBjtmEguCoR5dYsPqd0Rre20BtU79nsVp+rtdE8EuMPzh1fA1viE
Py6tWP0o+k2HRW6qrtm6Q+FwHDq4BXimpgkZjTDJ8YwoMt0YnVLuwkWhPFZaNXnquh
MVjQwGzexV7vBdbGbSZeib6OlWt5rMYTsI3dhlYHekNQudjB/siEkrosrncHOsAVkd
si6MjJJgiVDkA==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <083301da6830$63224480$2966cd80$@SGA.Ninja>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <cd441398-c4d4-4d33-9df7-43163b1d856d@tompassin.net>
X-Mailman-Original-References: <06f101da66da$902357f0$b06a07d0$@SGA.Ninja>
<C72A9439-2300-4DCD-8A56-7C3AAE718EF4@barrys-emacs.org>
<070d01da66fa$5faea870$1f0bf950$@SGA.Ninja>
<31caf694-99fd-41ca-a98c-cb0d5d4a758e@tompassin.net>
<077801da6782$4f6046d0$ee20d470$@SGA.Ninja>
<13edcbad-1914-424c-97aa-3679eaf77fd8@mrabarnett.plus.com>
<07b101da6795$97d57df0$c78079d0$@SGA.Ninja>
<5d93173f-b172-408a-a052-c670214581b2@mrabarnett.plus.com>
<07c701da679e$d3a8a6f0$7af9f4d0$@SGA.Ninja>
<dd484037-16c8-b707-89f6-99f327207913@yahoo.co.uk>
<083301da6830$63224480$2966cd80$@SGA.Ninja>
 by: Thomas Passin - Sun, 25 Feb 2024 22:55 UTC

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.
> Kluge? Maybe but it works.

Right, just what I wrote earlier:

"have the function that responds to the resize event perform the action
that you want"

> Mischief Managed.
>
> ========================
> As for the most recent suggestion, it fails for me:
>
> Traceback (most recent call last):
> File "F:/___zInsulin Code A 08-02-23/WinPic/IOWw.pyw", line 14, in <module>
> print("Ww Outside = <" + str(Ww) > + ">")
> TypeError: bad operand type for unary +: 'str'
>
> With the need to close the window, it adds an extra step and intervention to the program to use. I am not sure how this help[s.
>
> As a curio, it would be interesting to see how to use the value of a variable, created in the function used here, and make it available to the code outside the function.
>
>
>
> SGA
>
> -----Original Message-----
> From: Alan Gauld <learn2program@gmail.com>
> Sent: Sunday, February 25, 2024 12:44 PM
> To: Steve GS <Gronicus@SGA.Ninja>; 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(Ww) + ">")
>
> root = tk.Tk()
> root.bind('<Configure>', on_configure)
> root.mainloop()
>
> print("Ww Outside = <" + str(Ww) > + ">")
>
> Produces:
> Ww Inside = <200>
> Ww Inside = <200>
> Ww Inside = <205>
> Ww Inside = <205>
> Ww Inside = <206>
> Ww Inside = <206>
> Ww Outside = <206>
>
> HTH
>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor