Bring window to top in Tk

Discussion in 'Perl Misc' started by Larry, Dec 8, 2005.

  1. Larry

    Larry Guest

    I have a Perl/Tk program which does a long process and I want to be
    able to do other things while it's working. Is there any way to make
    my program put its window on top of all other applications when it's
    done?
    Larry, Dec 8, 2005
    #1
    1. Advertising

  2. Larry

    Ala Qumsieh Guest

    Larry wrote:
    > I have a Perl/Tk program which does a long process and I want to be
    > able to do other things while it's working. Is there any way to make
    > my program put its window on top of all other applications when it's
    > done?


    http://search.cpan.org/~gbrock/Tk-StayOnTop-0.11/

    --Ala
    Ala Qumsieh, Dec 8, 2005
    #2
    1. Advertising

  3. Larry

    robic0 Guest

    On 7 Dec 2005 17:24:02 -0800, "Larry" <>
    wrote:

    >I have a Perl/Tk program which does a long process and I want to be
    >able to do other things while it's working. Is there any way to make
    >my program put its window on top of all other applications when it's
    >done?


    Now why would you want to do that?
    If I had to use this program and I were running another window
    that had the focus and in the middle of typing or clicking a stupid
    windows took the focus from me, I would never run this stupid thing
    again. Especially bogus Perl window crap! Problem is some people
    think their running program is more important than what the user
    might be doing somewhere else. Don't ask this question with the
    assertion that this is somehow OK for everybody to do. There's
    gui guidelines on Microsofts website, for the people such as you
    who are neophyte's to user friendlyness, and in my opinion, just
    plain intrusive on multi-tasking os's.

    Look for a beep or taskbar flash method somewhere.
    robic0, Dec 8, 2005
    #3
  4. Larry

    Larry Guest

    robic0 wrote:
    > On 7 Dec 2005 17:24:02 -0800, "Larry" <>
    > wrote:
    >
    > >I have a Perl/Tk program which does a long process and I want to be
    > >able to do other things while it's working. Is there any way to make
    > >my program put its window on top of all other applications when it's
    > >done?

    >
    > There's
    > gui guidelines on Microsofts website, for the people such as you
    > who are neophyte's to user friendlyness, and in my opinion, just
    > plain intrusive on multi-tasking os's.
    >
    > Look for a beep or taskbar flash method somewhere.


    OK, I would be fine with taskbar flash... just something to get the
    user's attention so they don't have to keep checking the application.
    Anybody have an idea on that?
    Larry, Dec 8, 2005
    #4
  5. Larry

    Larry Guest

    Ala Qumsieh wrote:
    > Larry wrote:
    > > I have a Perl/Tk program which does a long process and I want to be
    > > able to do other things while it's working. Is there any way to make
    > > my program put its window on top of all other applications when it's
    > > done?

    >
    > http://search.cpan.org/~gbrock/Tk-StayOnTop-0.11/
    >
    > --Ala


    Thanks, I will look at that, but it doesn't seem to be exactly what I
    want. I don't want my window to *stay* on top ... I want it to jump to
    the top only when it's done.
    Larry, Dec 8, 2005
    #5
  6. Larry

    Larry Guest

    Larry wrote:
    > I have a Perl/Tk program which does a long process and I want to be
    > able to do other things while it's working. Is there any way to make
    > my program put its window on top of all other applications when it's
    > done?


    In browsing CPAN, I found Tk::WM which seemed promising at first, but
    doesn't seem to have a method for bringing a window to the top of all
    applications. Am I missing something there?
    Larry, Dec 8, 2005
    #6
  7. Larry

    Larry Guest

    robic0 wrote:
    > On 7 Dec 2005 17:24:02 -0800, "Larry" <>
    > wrote:
    >
    > >I have a Perl/Tk program which does a long process and I want to be
    > >able to do other things while it's working. Is there any way to make
    > >my program put its window on top of all other applications when it's
    > >done?

    >
    > Now why would you want to do that?
    > If I had to use this program and I were running another window
    > that had the focus and in the middle of typing or clicking a stupid
    > windows took the focus from me, I would never run this stupid thing
    > again. Especially bogus Perl window crap! Problem is some people
    > think their running program is more important than what the user
    > might be doing somewhere else. Don't ask this question with the
    > assertion that this is somehow OK for everybody to do. There's
    > gui guidelines on Microsofts website, for the people such as you
    > who are neophyte's to user friendlyness, and in my opinion, just
    > plain intrusive on multi-tasking os's.
    >
    > Look for a beep or taskbar flash method somewhere.


    I agree with your premise that programs should behave and play nicely
    with others but the overall consideration is what is best for the user.
    If the program has no way to tell the user it's done, the user has to
    keep checking it periodically... not a very efficient use of the user's
    time. A taskbar flash or a way to pop up a little window in the lower
    right corner would be ideal, but I don't know if Tk can do those things
    (at least not without a lot of work). A beep is not ideal, especially
    if people are sitting near to others.
    Larry, Dec 8, 2005
    #7
  8. Larry

    Larry Guest

    Larry wrote:
    > Larry wrote:
    > > I have a Perl/Tk program which does a long process and I want to be
    > > able to do other things while it's working. Is there any way to make
    > > my program put its window on top of all other applications when it's
    > > done?


    Actually, on thinking about it further, what I really want to do is
    allow the user to minimize the window while it's working, then when
    it's done "restore" the window. How can I do that?
    Larry, Dec 8, 2005
    #8
  9. "Larry" <> wrote in
    news::

    > Larry wrote:
    >> Larry wrote:


    I am not sure you really want to keep talking to yourself online.

    >> > I have a Perl/Tk program which does a long process and I want to be
    >> > able to do other things while it's working. Is there any way to
    >> > make my program put its window on top of all other applications
    >> > when it's done?

    >
    > Actually, on thinking about it further, what I really want to do is
    > allow the user to minimize the window while it's working, then when
    > it's done "restore" the window. How can I do that?


    Why isn't it acceptable for the user to come back and check when he/she
    feels like checking? Why do you feel like *you* have the right to
    interrupt something else the user might have been doing while your
    program did its thing?

    Anyway, see <URL:http://search.cpan.org/~ni-s/Tk-804.027/pod/Wm.pod>

    Sinan

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
    A. Sinan Unur, Dec 8, 2005
    #9
  10. Larry

    Larry Guest

    A. Sinan Unur wrote:
    > Why isn't it acceptable for the user to come back and check when he/she
    > feels like checking? Why do you feel like *you* have the right to
    > interrupt something else the user might have been doing while your
    > program did its thing?


    I guess you would have to ask the user. It depends on the application.
    I can definitely think of applications where I would want it to
    immediately notify me and not wait till I got around to checking.
    Larry, Dec 8, 2005
    #10
  11. Larry

    Larry Guest

    Larry wrote:
    > Actually, on thinking about it further, what I really want to do is
    > allow the user to minimize the window while it's working, then when
    > it's done "restore" the window. How can I do that?


    I found it!

    $MW->deiconify;

    So the way it will work is the use will minimize the window and when
    the process is done, it will "deiconify" (in the Windows world, that
    would be "restore" the window).

    Thanks everyone that helped... interesting side discussion, too, about
    UI design.
    Larry, Dec 8, 2005
    #11
  12. Larry

    Ala Qumsieh Guest

    Larry wrote:

    > want. I don't want my window to *stay* on top ... I want it to jump to
    > the top only when it's done.


    Then a simple:

    $MainWindow->raise;

    should do it.

    --Ala
    Ala Qumsieh, Dec 8, 2005
    #12
  13. Larry

    John Guest

    Sinan wrote:

    "Why isn't it acceptable for the user to come back and check when
    he/she
    feels like checking? Why do you feel like *you* have the right to
    interrupt something else the user might have been doing while your
    program did its thing?"

    Why? Well, I'm willing to entertain the possibility that Larry --
    unlike the rest of us -- has made actual eye contact with the user, and
    knows firsthand what makes the user' s job easier or harder.
    John, Dec 8, 2005
    #13
  14. "Larry" <> wrote in news:1134059474.251037.232840
    @g47g2000cwa.googlegroups.com:

    > I found it!


    Riiiight.

    Sinan
    A. Sinan Unur, Dec 8, 2005
    #14
  15. Larry

    Larry Guest

    John wrote:
    > Sinan wrote:
    >
    > "Why isn't it acceptable for the user to come back and check when
    > he/she
    > feels like checking? Why do you feel like *you* have the right to
    > interrupt something else the user might have been doing while your
    > program did its thing?"
    >
    > Why? Well, I'm willing to entertain the possibility that Larry --
    > unlike the rest of us -- has made actual eye contact with the user, and
    > knows firsthand what makes the user' s job easier or harder.


    Yes, you're absolutely right! I have purposely not gone into the
    details of what the app does (because it's not relevant to my question)
    but trust me, the app would be far less usable if it couldn't grab the
    user's attention when the user is doing something else.
    Larry, Dec 8, 2005
    #15
    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. =?Utf-8?B?RHVzdGluIElJLg==?=

    make a browser window stay on top window handle?

    =?Utf-8?B?RHVzdGluIElJLg==?=, Aug 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    853
    Mark Rae
    Aug 18, 2004
  2. Replies:
    0
    Views:
    299
  3. Replies:
    0
    Views:
    548
  4. Al

    Bring window to top

    Al, Aug 29, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    433
  5. find clausen

    window.opener.top.location.top.close ???

    find clausen, Oct 5, 2003, in forum: Javascript
    Replies:
    2
    Views:
    422
    find clausen
    Oct 5, 2003
Loading...

Share This Page