Re: Toolbar and custom views
Re: Toolbar and custom views
- Subject: Re: Toolbar and custom views
- From: John Timmer <email@hidden>
- Date: Thu, 01 May 2003 10:50:46 -0400
Kristofer -
Most of what you're looking for is in the NSWindow documentation - it's
probably worth reading that over carefully, since you've clearly gotten
comfortable with the Obj-C syntax.
>
How do I change title of a main window to (example)View1 when I click
>
on the "View1" button and view "View1" appears ?
[mainWindow setTitle: @"View1"];
>
I also have to left some free space in the custom views for toolbar.
>
This space is visble when I customize toolbar (when choose "Text
>
only"). If I do
>
not have any free space the content part of the custom view is placed
>
"under"
>
the toolbar. How do I avoid it ?
Once again i'll give you the caveat that i've never actually implemented an
NSToolbar myself. I'm also not entirely sure what you're asking - is
shrinking the toolbar leaving blank, open space underneath it?
That said, looking over the documentation, it appears the the toolbar itself
automatically sets its height based on the largest size of the items it
contains. The NSToolbarItem class has methods to get and set min and max
sizes - my guess is that you want to do something along the lines of setting
the window size to the total of the NSToolbarItem's max size and the view
you're putting underneath it.
Hope this is useful - please email me back if I got what you want to do
wrong.
Cheers,
John
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.