Programmatically collapsing split view
Programmatically collapsing split view
- Subject: Programmatically collapsing split view
- From: Nicholas Riley <email@hidden>
- Date: Thu, 20 Feb 2003 17:39:58 -0600
- Mail-followup-to: email@hidden
Hi,
I am trying to implement programmatic collapse and expand in a
NSSplitView subclass and am running into problems. The primary issue
is that there seems to be no way to programmatically expand a subview
in a way that NSSplitView recognizes and will preserve. What I've
been doing to collapse is to set the width to 0, but NSSplitView
appears to set the width to the minimum permitted and then move the
frame to the point {1e6, 1e6}.
If I try to do a setFrameOrigin: {1e6, 1e6} then call adjustSubviews,
NSSplitView moves the view right back where it started, which isn't
much help.
What's even weirder is the following:
- Subview frame starts out as: (0<>0 extent: 178.328<>491)
- I programmatically collapse the subview: (0<>0 extent: 0<>491)
So far, so good.
- I programmatically expand the subview:
before: {{1e+06, 1e+06}, {0, 491}} {{9, 0}, {621, 491}}
before expand: super thinks we're collapsed
after reposition: {{0, 0}, {178.328, 491}} {{187.328, 0}, {442.672, 491}}
expand before adjustSubviews: super thinks we're collapsed
after adjust: {{0, 0}, {178.328, 491}} {{9, 0}, {621, 491}}
expand after adjustSubviews: super thinks we're collapsed
So at some point (runloop? redisplay?) the subview was moved to {1e6,
1e6} and NSSplitView is convinced it's been collapsed. OK, I guess.
But when I move it back, and even invoke adjustSubviews, NSSplitView
won't get unconvinced, and while the frame of the left subview is
properly set, the right subview won't move.
Is there any workaround, am I using NSSplitView incorrectly, or what?
Thanks,
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.