Re: Reordering views
Re: Reordering views
- Subject: Re: Reordering views
- From: Ricky Sharp <email@hidden>
- Date: Thu, 07 Apr 2005 13:44:33 -0500
On Thursday, April 07, 2005, at 01:21PM, Matthew Weinstein <email@hidden> wrote:
>Here's my plan: In IB I'll have an NSTableView and an NSOutlineview
>100% overlapping each other. When I need to display hierarchical info
>I'll move the outline view forward and hide the tableview. If my data
>is not hierarchical I'll do the same with the tableview (hide the
>outlineview and move forward the tableview).
>
>So, I'm wondering where is the command which rearranges the order of
>views in a window?
Life will be so much easier if you use a two-item tabless NSTabView. Also set it so it doesn't draw its background. This effectively gives you a transparent tab view. Then, have the first tab contain your table view; the second tab contain your outline view.
Switching then becomes a trivial task. See selectTabViewItemAtIndex: and selectTabViewItem:. The latter allows you to shield yourself from the physical order of the tab items.
Tip: Working with a transparent, tabless tab view can be tricky in IB. What I do is set the tab view's size just a tad bit larger in one dimension than what the tab content is. For example, if both your table and outline view are 800 x 600, consider making the size of the tab view to be 820 x 600. This will give you an area to single-click and double-click on which is required in order to bring up appropriate inspector panes, allow you to drag items into it, etc.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden