views:

37

answers:

1

I'm creating an application and I don't want a title bar:

If the title remains the same all the time, does it make sense to show it? For example, if an app doesn’t show the names of documents, or any other assets that it opens, and there is plenty of space at the top around other controls to grab onto if you want to move the window around, does the title serve much purpose? http://i.imgur.com/C9mTo.png

The problem is: how do I do this? I tried using [mainWindow setStyleMask:NSBorderlessWindowMask]; but I can't make it have round corners. I really don't know how to make round corners. Next to that, I can't make it have a resize control. If I use [mainWindow setStyleMask:NSBorderlessWindowMask | NSResizableWindowMask]; it's not borderless anymore. Can anyone help me? Thanks.

+1  A: 

There is a similar SO question here: Hide NSWindow title bar.

Basically if you use NSBorderlessWindowMask you can't use any other style mask so you will have to implement your own window controls and round the corners yourself.

Or you could use a regular NSWindow and just not set a title. See Tweetie.app for an example.

Hopefully Apple will provide new window styles with 10.7.

Nathan Kinsinger