Window is not active...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krishshan
    New Member
    • Jan 2008
    • 5

    #1

    Window is not active...

    Hi,

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

    [code=perl]
    use Tk;
    $ParentWindow = MainWindow->new;
    $ParentWindow->geometry("300x 100");
    $ParentWindow->title("Multipl e Windows Test");
    $button1 = $ParentWindow->Button(-text => "Open new window",
    -command => \&button1_fun c)->pack(-side => "top");
    $ParentWindow->Button(-text => "Exit", -command => sub{exit})->pack();
    sub button1_func {
    $ChildWindow = $ParentWindow->Toplevel;
    $ChildWindow->geometry("200x 150");
    $ChildWindow->title("Sub Window #1");
    $child_button = $ChildWindow->Button(-text => "Close window",
    -command => [$ChildWindow => 'destroy'])->pack();
    }
    MainLoop;
    [/code]

    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
  • eWish
    Recognized Expert Contributor
    • Jul 2007
    • 973

    #2
    I would check the Win32 Modules mailing list at ActiveState. That is probably going to be a better resource.

    --Kevin

    Comment

    • krishshan
      New Member
      • Jan 2008
      • 5

      #3
      Ok Kevin,

      Looking forward for your reply,
      Thanks.

      Comment

      Working...