Re: Hiding MainWindow

[email protected]
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
=?utf-8?B?xaBJxaBLQSBNYXJ0aW4=?= <[email protected]> wrote:
> Hello,
> 
> It's evil, I know, but is it possible to display Tk::Dialog without displaying MainWindow ?
> I want reuse my old dialogs I called in pTk application in application that doesn't use pTk with minimal effort :).
> 
> Pseudocode of function that shows dialog can look like :
> 
> sub showSpecialDlg
> {
> 	my $mw = shift;
> 
> 	if(!$mw) 
> 	{
> 		$mw = new MainWindow;
> 		# just a pseudofunction
> 		$mw->hide;
> 	}
> 
> 	$dlg = $mw->Dialog(-title => 'dialog');
> 	... Initialize inside of dialog ...
> 	$dlg->Show;
> }
> 
> Calling from non-tk script would be just using the right package and then : $retval = &showSpecialDlg;
> 
> Is there something I can use instead of imaginary '$mw->hide;' ?
> 

Try
	$mw->withdraw

However, I think it is forbidden in Tk804 to withdraw the transient
master.

Regards,
	Slaven

-- 
     __o		Slaven Rezic
   _`\<,_		slaven <at> rezic <dot> de
__(_)/ (_)____
______________________________________________________________________________
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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.