Patches item #1500773, was opened at 2006-06-05 08:35
Message generated for change (Comment added) made by klappnase
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1500773&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tkinter
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Couch (gregcouch)
Assigned to: Martin v. Löwis (loewis)
Summary: wm_attributes doesn't take keyword arguments

Initial Comment:
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).

----------------------------------------------------------------------

Comment By: klappnase (klappnase)
Date: 2006-07-20 12:43

Message:
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.


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2006-06-17 11:30

Message:
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?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1500773&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches

Reply via email to