-[NSWindow setToolbar:] shrinks window frame
-[NSWindow setToolbar:] shrinks window frame
- Subject: -[NSWindow setToolbar:] shrinks window frame
- From: Brian Webster <email@hidden>
- Date: Mon, 28 Apr 2003 13:21:16 -0500
I've got a window in which I'd like to be able to edit data in two
different modes, and I have two different toolbars I'd like to switch
between when switching modes, since different sets of commands apply to
the two modes. However, if I use the setToolbar: method to set the
toolbar of the window, it shrinks the window so that the content is
completely hidden and only the toolbar is shown. I put a breakpoint on
-[NSWindow setFrame:display:] to find out how it was getting called and
got this stack trace:
#0 0x9315f3d0 in -[NSWindow setFrame:display:]
#1 0x931951e4 in -[NSThemeFrame
_growWindowReshapeContentAndToolbarView:animate:]
#2 0x931c8ba8 in -[NSThemeFrame
_reshapeContentAndToolbarView:resizeWindow:animate:]
#3 0x9333a208 in -[NSThemeFrame _toolbarFrameSizeChanged:oldSize:]
#4 0x9318f6c0 in -[NSWindow setToolbar:]
I have one workaround that consists of saving the window's frame size,
setting the toolbar, and resetting the old frame size, but this results
in a "flash" where the window shrinks and grows back and looks pretty
awful.
Has anyone else run into this problem?
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.