469,295 Members | 1,936 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,295 developers. It's quick & easy.

Window is not active...

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
2 1331
eWish
971 Expert 512MB
I would check the Win32 Modules mailing list at ActiveState. That is probably going to be a better resource.

--Kevin
Jan 21 '08 #2
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.

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 zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.