By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,852 Members | 1,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,852 IT Pros & Developers. It's quick & easy.

Window is not active...

P: 5
Hi,

I am using a following code to create a two window..

Expand|Select|Wrap|Line Numbers
  1. use Tk;
  2. $ParentWindow = MainWindow->new;
  3. $ParentWindow->geometry("300x100");
  4. $ParentWindow->title("Multiple Windows Test");
  5. $button1 = $ParentWindow->Button(-text => "Open new window",
  6.                           -command => \&button1_func)->pack(-side => "top");
  7. $ParentWindow->Button(-text => "Exit", -command => sub{exit})->pack();
  8. sub button1_func {
  9. $ChildWindow = $ParentWindow->Toplevel;
  10. $ChildWindow->geometry("200x150");
  11. $ChildWindow->title("Sub Window #1");
  12. $child_button = $ChildWindow->Button(-text => "Close window",
  13.                                        -command => [$ChildWindow => 'destroy'])->pack();
  14. }
  15. MainLoop;
  16.  
By using this code I am facing a problem, child window is not active until I click a mouse point click on a empty space..

I need the child window activate when I click the "open the window"

kindly anyone help me or provide suggestions regarding this..

Thanks,
Shan
Jan 18 '08 #1
Share this Question
Share on Google+
2 Replies


eWish
Expert 100+
P: 971
I would check the Win32 Modules mailing list at ActiveState. That is probably going to be a better resource.

--Kevin
Jan 21 '08 #2

P: 5
Ok Kevin,

Looking forward for your reply,
Thanks.
Jan 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.