Re: Toolbar and custom views
Re: Toolbar and custom views
- Subject: Re: Toolbar and custom views
- From: Kristofer Szymanski <email@hidden>
- Date: Thu, 1 May 2003 17:04:45 +0200
Hello,
Thank you very much for your answer. I will read the documentation.
I'm also not entirely sure what you're asking - is
shrinking the toolbar leaving blank, open space underneath it?
Yes, because I have to leave some space in the custom view, otherwise
part of the items in custom view are "under" the toolbar.
The space is not visible when you have "Icons & Text" in the toolbar but
when you choose to have "Text Only" the toolbar is smaller and the
space is visible. Everything looks good just after changing the toolbar
from
"Icons & Text" to Text Only" but when you click on the button in the
toolbar
space becomes visible.
/ Kristofer
On Thursday, May 1, 2003, at 16:50 Europe/Stockholm, John Timmer wrote:
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.