Temporarily Hide Window

  • I would like to temporarily "hide" a window that has a sheet showing,
    and then show it later in its  original state (with the sheet).

    If I just the close the window and then show it again, the sheet
    disappears and the window stops accepting keyboard events (mouse
    events continue to be accepted).

    I'd like to know if there's a way to do what I want. As always, any
    help is greatly appreciated.

    Thanks.
  • Maybe you can use (typed in Mail):

    [window setAlphaValue:0.0];
    [[window attachedSheet] setAlphaValue:0.0];

    Setting the alpha to zero makes the window also invisible to events,
    if you want to make the window reappear just set the alpha back to
    1.0 again.

    Best, Patrick

    On 17-Sep-06, at 21:17 PM, Shoaib Hannani wrote:

    > I would like to temporarily "hide" a window that has a sheet
    > showing, and then show it later in its  original state (with the
    > sheet).
    >
    > If I just the close the window and then show it again, the sheet
    > disappears and the window stops accepting keyboard events (mouse
    > events continue to be accepted).
    >
    > I'd like to know if there's a way to do what I want. As always, any
    > help is greatly appreciated.
    >
    > Thanks.
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/meirmans%
    > 40sympatico.ca
    >
    > This email sent to <meirmans...>
  • You can also try the NSWindow method |orderOut:| ->

      [NSWindow orderOut:aSender];

    - Nick

    On 9/17/06, PGM <meirmans...> wrote:
    >
    > Maybe you can use (typed in Mail):
    >
    > [window setAlphaValue:0.0];
    > [[window attachedSheet] setAlphaValue:0.0];
    >
    > Setting the alpha to zero makes the window also invisible to events,
    > if you want to make the window reappear just set the alpha back to
    > 1.0 again.
    >
    > Best, Patrick
    >
    >
    >
    > On 17-Sep-06, at 21:17 PM, Shoaib Hannani wrote:
    >
    >> I would like to temporarily "hide" a window that has a sheet
    >> showing, and then show it later in its  original state (with the
    >> sheet).
    >>
    >> If I just the close the window and then show it again, the sheet
    >> disappears and the window stops accepting keyboard events (mouse
    >> events continue to be accepted).
    >>
    >> I'd like to know if there's a way to do what I want. As always, any
    >> help is greatly appreciated.
    >>
    >> Thanks.
    >>
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/meirmans%
    >> 40sympatico.ca
    >>
    >> This email sent to <meirmans...>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<kreeger.dev...>
    >
    > This email sent to <kreeger.dev...>
    >
  • [NSWindow orderOut:sender] will hide the window but when the window
    is restored using orderFront:, the sheet is gone.

    I also tried setting the alpha of both the window and its attached
    sheet to 0.0, as suggested by Patrick, but this leaves a grey
    horizontal line (the opening where the sheet slides out of) on the
    screen.

    Any other ideas on how a window and it's attached sheet can be
    temporarily hidden and then restored?

    My only other choice at the moment is to be to keep track of the
    sheet that is currently showing, and re-displaying the sheet when the
    window is restored.

    Thanks, Shoaib

    On Sep 18, 2006, at 2:32 PM, Nick Kreeger wrote:

    > You can also try the NSWindow method |orderOut:| ->
    >
    > [NSWindow orderOut:aSender];
    >
    > - Nick
    >
    > On 9/17/06, PGM < <meirmans...> wrote:
    > Maybe you can use (typed in Mail):
    >
    > [window setAlphaValue: 0.0];
    > [[window attachedSheet] setAlphaValue:0.0];
    >
    > Setting the alpha to zero makes the window also invisible to events,
    > if you want to make the window reappear just set the alpha back to
    > 1.0 again.
    >
    > Best, Patrick
    >
    >
    >
    > On 17-Sep-06, at 21:17 PM, Shoaib Hannani wrote:
    >
    >> I would like to temporarily "hide" a window that has a sheet
    >> showing, and then show it later in its  original state (with the
    >> sheet).
    >>
    >> If I just the close the window and then show it again, the sheet
    >> disappears and the window stops accepting keyboard events (mouse
    >> events continue to be accepted).
    >>
    >> I'd like to know if there's a way to do what I want. As always, any
    >> help is greatly appreciated.
    >>
    >> Thanks.
    >>
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/meirmans%
    >> 40sympatico.ca
    >>
    >> This email sent to <meirmans...>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...> )
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/kreeger.dev%
    > 40gmail.com
    >
    > This email sent to <kreeger.dev...>
    >
previous month september 2006 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Go to today