Deactivate a window in Perl::Tk?

Discussion in 'Perl Misc' started by Josef Moellers, Jan 6, 2005.

  1. Hi,

    I'm writing a small application which might require some action to be
    performed before the main functionality can be used, e.g. the powering
    on of some device. To alert the user, I create a new Toplevel window
    with a message and some buttons (e.g. "Done", "Abort"). I'd like to
    disable the main window until the user pressed any one of these buttons
    (setting a global variable and destroy-ing the new Toplevel window). I
    could, obviously, change the state of all buttons in the main window to
    "disabled", but is there an easier way of disabling an entire window?

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
    Josef Moellers, Jan 6, 2005
    #1
    1. Advertising

  2. Josef Moellers

    John Bokma Guest

    Josef Moellers wrote:

    > Hi,
    >
    > I'm writing a small application which might require some action to be
    > performed before the main functionality can be used, e.g. the powering
    > on of some device. To alert the user, I create a new Toplevel window
    > with a message and some buttons (e.g. "Done", "Abort"). I'd like to
    > disable the main window until the user pressed any one of these buttons
    > (setting a global variable and destroy-ing the new Toplevel window). I
    > could, obviously, change the state of all buttons in the main window to
    > "disabled", but is there an easier way of disabling an entire window?


    http://www.google.com/search?q=perl Tk Modal

    --
    John Small Perl scripts: http://johnbokma.com/perl/
    Perl programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html
    John Bokma, Jan 6, 2005
    #2
    1. Advertising

  3. John Bokma wrote:
    > Josef Moellers wrote:
    >
    >
    >>Hi,
    >>
    >>I'm writing a small application which might require some action to be
    >>performed before the main functionality can be used, e.g. the powering
    >>on of some device. To alert the user, I create a new Toplevel window
    >>with a message and some buttons (e.g. "Done", "Abort"). I'd like to
    >>disable the main window until the user pressed any one of these buttons
    >>(setting a global variable and destroy-ing the new Toplevel window). I
    >>could, obviously, change the state of all buttons in the main window to
    >>"disabled", but is there an easier way of disabling an entire window?

    >
    >
    > http://www.google.com/search?q=perl Tk Modal


    Thanks, That's what I needed.
    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
    Josef Moellers, Jan 6, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dvt
    Replies:
    13
    Views:
    1,212
  2. Replies:
    0
    Views:
    586
  3. keithb
    Replies:
    1
    Views:
    1,050
    keithb
    Jun 8, 2006
  4. Wild Karl-Heinz

    webrick dns lookup deactivate ...

    Wild Karl-Heinz, Jun 15, 2004, in forum: Ruby
    Replies:
    0
    Views:
    121
    Wild Karl-Heinz
    Jun 15, 2004
  5. Seth Russell
    Replies:
    14
    Views:
    197
    Donius
    Sep 22, 2005
Loading...

Share This Page