Re: how do I do attributes(-toolwindow=>1) in perlTk?

konovalo <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
>>This likely has something to do with how Windows reparents the window into a
>>new wrapper (seemingly at will).
>>
>>See this old post I wrote for more windows weirdness:
>>
>>http://groups.google.ca/groups?selm=pMFc8.72383%24A44.4272341%40news2.calgar
>>y.shaw.ca
>>
>>Anyways - if you delay the call until after the MainLoop it works OK.
>>
>>use Tk;
>>$mw=tkinit;
>>$tl=$mw->Toplevel;
>>print hex($tl->id);
>>$tl->Button(-text=>'Ok')->pack;
>>#$tl->attributes(-toolwindow=>1);
>>$mw->after(1000,sub {$tl->attributes(-toolwindow=>1)});
>>MainLoop;
>>
>>    
>>

thanks for finding this out. Indeed, this works in a way you said.

>
>
>:(  Tk804.027, perl 5.8.5, suse linux 9.2
>
>$ perl test.pl
>41943044XS_Tk__Callback_Call error:wrong # args: should be "wm attributes 
>window" at Tk804/Tk/Submethods.pm line 37.
>  
>
that  fearure promised for  Win32 only, so using  such a feature not for 
cross-platform scripts.

unfortunately.
because it results in nice-looking widgets

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.