How to Make a Very Thin Window?
How to Make a Very Thin Window?
- Subject: How to Make a Very Thin Window?
- From: Steve Cronin <email@hidden>
- Date: Tue, 4 Dec 2007 14:56:18 -0600
Folks;
I've spend some time trying to make a very narrow window and have run
into a number of obstacles.
Perhaps someone here can shake up my misconceptions or point out a
useful sample...
I want to make a window which can resize down to a narrow strip
window (say 25 pixels wide).
The first issue is that I cannot do this and have a normal title bar.
An IB created window appears to have a minimum width of 74 pixels.
(This allows the 3 normal controls to appear and not be hidden by a
resize event)
Am I confused on this point? Is there a way to do this in IB?
(Tiger not Leopard BTW).
So I subclass NSWindow and do the
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned
int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag {
setting styleMask = NSBorderlessWindowMask
If I load the new class into IB designate the window's custom class
and then set the window controller's -window to this instance, I
still get the limitation on width.
NOTE: A resize widget will not show up even if -
setShowsResizeIndicator:YES.
So I has to implement my own resizing and even then the resize WILL
NOT resize less than the same amount as when using standard IB window.
So I conclude that the instantiation process thru IB prevents what I
want.
Am I confused on this point? Is there a way to accomplish resizing
custom window classes in IB?
So now I feel I must implement the window controller and the window
completely programmatically without any use of IB.
But then how do utilize the views which have all of the UI widgets
that I need on this window?
So much work and time for something that seems so not complicated: a
window with a 'MINI' title bar...
Having the 3 controls at top left is desirable - users are familiar
with windows that have them and users expect windows to have them.
I want their functionality to work (Close, Minimze,...) I just want a
skinny version.
Anyone have any useful counsel?
Steve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden