Issue 1500773: wm_attributes doesn't take keyword arguments
Issue1500773
Created on 2006-06-05 06:35 by gregcouch, last changed 2022-04-11 14:56 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Tkinter.patch | gregcouch, 2006-06-05 06:35 | wm_attributes patch | ||
| issue1500773.diff | gpolo, 2008-06-07 22:21 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg50427 - (view) | Author: Greg Couch (gregcouch) | Date: 2006-06-05 06:35 | |
The Tk wm attributes command takes option arguments (from the Tk wm manual page): wm attributes window ?option value option value...? And option arguments are normally given with keyword arguments in Tkinter (most if not all widget creation functions and widget commands). The attached patch changes the wm_attributes method to take keyword arguments, so top.wm_attributes(alpha=.8) will work as expected (on Windows XP and Mac OS X). |
|||
| msg50428 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2006-06-17 09:30 | |
Logged In: YES
user_id=21627
This is an incompatible change. I also don't see the point;
top.wm_attributes('alpha',.8)
should work just fine, no?
|
|||
| msg50429 - (view) | Author: klappnase (klappnase) * | Date: 2006-07-20 10:43 | |
Logged In: YES
user_id=797929
I do not have winXP or OSX available to actually test it,
but I doubt that
top.wm_attributes('alpha',.8)
will work; from Tk documentation it looks like you will have
to write
top.wm_attributes('-alpha',.8)
which is in fact not what one would expect.
Maybe a better solution than Greg's patch was to change
wm_attributes() to accept both ways, like:
def wm_attributes(self, *args, **kw):
args = ('wm', 'attributes', self._w) + args +
self._options({}, kw)
return self.tk.call(args)
so that old code will not break and the more intuitive
version that Greg suggested is also legal.
|
|||
| msg67668 - (view) | Author: Guilherme Polo (gpolo) * ![]() |
Date: 2008-06-03 18:21 | |
I'm adding my own version, this was done against python-trunk |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:17 | admin | set | github: 43457 |
| 2012-03-21 19:45:52 | asvetlov | set | nosy:
+ asvetlov |
| 2010-08-09 03:27:04 | terry.reedy | set | versions: + Python 3.2, - Python 3.1, Python 2.7 |
| 2009-03-21 03:39:03 | ajaksu2 | set | stage: test needed type: enhancement versions: + Python 3.1, Python 2.7, - Python 2.5 |
| 2008-06-07 22:21:02 | gpolo | set | files: + issue1500773.diff |
| 2008-06-07 22:20:38 | gpolo | set | files: - issue1500773.diff |
| 2008-06-03 18:21:51 | gpolo | set | files:
+ issue1500773.diff nosy: + gpolo messages: + msg67668 |
| 2006-06-05 06:35:26 | gregcouch | create | |
