FROM : Ricky Sharp
DATE : Thu Apr 07 20:44:33 2005
On Thursday, April 07, 2005, at 01:21PM, Matthew Weinstein <<email_removed>> 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)
DATE : Thu Apr 07 20:44:33 2005
On Thursday, April 07, 2005, at 01:21PM, Matthew Weinstein <<email_removed>> 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)
| Related mails | Author | Date |
|---|---|---|
| Matthew Weinstein | Apr 7, 20:18 | |
| j o a r | Apr 7, 20:34 | |
| Ricky Sharp | Apr 7, 20:44 |






Cocoa mail archive

