• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Translucent Window and standard title buttons : is it possible ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Translucent Window and standard title buttons : is it possible ?


  • Subject: Translucent Window and standard title buttons : is it possible ?
  • From: Eric Morand <email@hidden>
  • Date: Tue, 9 May 2006 23:49:53 +0200

Hi List !

I'm having some bad times trying to display a window with a translucent background and the standard title bar buttons.

In my window controller, here is what I am doing :

NSWindow * window = [self window];

[window setOpaque:NO];
[window setBackgroundColor:[NSColor colorWithDeviceRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.75]];
[window setMovableByWindowBackground:YES];


Here is the result :

http://homepage.mac.com/eric.morand/.Pictures/Translucent.png

As you can see, the window background is not homogeneous : there is a strange kind of shadow in the middle of the window.

I've also tried to subclass NSWindow to initialize it with the NSBorderlessWindowMask style mask, and then changing the content view with a custom view of mine. It looks perfect but I have some problem with the title bar buttons. I've tried to add them to the content view, retrieving them with :

NSButton * closeButton = [NSWindow standardWindowButton:NSWindowCloseButton forStyleMask:NSBorderlessWindowMask];

But for some reason the don't behave like the standard title bar buttons : they are not "disabled" when the window is not the key window, and nothing happens when the mouse is moved over them - the standard buttons change their appearance.


Can someone help ? I'd like to match the behavior of the window that appears when a contact initiate a conversation in iChat.





Thanks,


Eric. _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Is Global Memory accessible in FRAMEWORKS ?
  • Next by Date: Is setNeedsDisplayInRect: smarter than I thought?
  • Previous by thread: When can useOptimizedDrawing be turned on?
  • Next by thread: Is setNeedsDisplayInRect: smarter than I thought?
  • Index(es):
    • Date
    • Thread