471,832 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,832 software developers and data experts.

Window is not active...


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;
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..

Jan 18 '08 #1
2 1384
971 Expert 512MB
I would check the Win32 Modules mailing list at ActiveState. That is probably going to be a better resource.

Jan 21 '08 #2
Ok Kevin,

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

Post your reply

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

Similar topics

1 post views Thread by David C. Barber | last post: by
2 posts views Thread by Svennglenn | last post: by
40 posts views Thread by Brian Jorgenson | last post: by
11 posts views Thread by objectref | last post: by
2 posts views Thread by =?Utf-8?B?YW5hbmQga3VtYXI=?= | last post: by
2 posts views Thread by starfoxsb | last post: by
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.