Re: Hiding tab view items
Re: Hiding tab view items
- Subject: Re: Hiding tab view items
- From: BareFeet <email@hidden>
- Date: Wed, 21 Oct 2009 18:02:21 +1100
This seems like a common requirement, so I keep thinking I must be
missing something simple.
For an example of similar functionality, look at Disk Utility. The
user can navigate through a tree of nested disks and partition nodes
in the left view. The right view shows a tab view that changes its tab
items depending on what tree node is selected on the left. For
instance, if you select a disk, you see the tab view items: First Aid,
Erase, Partition, RAID and Restore. But if you select a partition, the
"Partition" tab view item disappears.
Since there is no hidden/visible property for tab view items, it seems
that I have to dynamically delete and create tab view items, which is
prohibitively complicated since those tab view items also contain
other objects which must therefore also be dynamically created and
deleted.
At the moment, I've set up my tab view as tabless (ie the actual tabs
don't show). Instead of tabs, I've created several segmented controls,
one showing each desired set of segments. I've created a small second
tabless tab view where each tab just contains one of the segmented
controls. When the user selects a tree node (in the left pane),
bindings switches to the tab containing the desired segmented control.
When the user clicks on a segment, bindings then switches to the tab
view corresponding to that segment.
user selects tree node
-> bindings selects small tab view item which contains just the
desired segmented control
user selects segment in segmented control
-> bindings selects large tab view item which contains all the
necessary objects
This works and requires almost no code (just bindings), so it's
relatively neat. But it seems silly to have to create a second tab
view just to switch between different segment controls.
Any other insights?
Thanks,
Tom
BareFeet
_______________________________________________
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