Re: View sizing issue when using "disclosure view"
Re: View sizing issue when using "disclosure view"
- Subject: Re: View sizing issue when using "disclosure view"
- From: Ron Fleckner <email@hidden>
- Date: Wed, 2 Dec 2009 15:50:32 +1100
On 02/12/2009, at 2:14 PM, Bryan Zarnett wrote:
I'm having trouble making sure I have the correct springs and struts
for my view.
At the top of the view I have a Split View that when the user
resizes the window in height or length, the split view should
appropriately resize. At the bottom I have a disclosure dialog which
shows or hides an NSBox with some additional information. The
disclosure triangle changes the height of the window and changes the
origin.
The problem is that the split view automatically squishes on the
resize. What I want to happen is that the box should be hidden from
the window resize and the split views should stay where they are.
Thoughts?
Bryan
Hi Bryan,
I've been able to do this in a perhaps naive way, but it works reliably.
All the objects and widgets in your un-resized window should have
their struts rigid on the top (and sides if required), leaving the
bottom strut alone (not rigid).
Then, when the view window needs to grow upon user request,
programmatically do the resizing and add your box at the correct co-
ordinates.
For example:
[myWindow setFrame:NSMakeRect(<new window co-ords>) display:YES
animate:YES];
[myBox setFrameOrigin:NSMakePoint(<origin of box in window co-ords>)];
NSView *content = [myWindow contentView];
[content addSubview:autoPilotMaxView];
HTH,
Ron
_______________________________________________
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