Re: How to hide the divider in a collapsed NSSplitView pane

2008-06-21 Thread Milen Dzhumerov

Hi Markus,

AppKit release notes say this:

A common UI pattern now is to provide a button to show and hide one  
subview or another of a split view, and completely hide the divider  
when the subview between it and the edge of the window is hidden. To  
make it easy for you to do this there is a new - 
splitView:shouldHideDividerAtIndex: delegate method you can implement.


M

On 21 Jun 2008, at 23:38, Markus Spoettl wrote:


Hello List,

 I've done a lot of testing and googling but I can't figure out how  
or even if it is possible to completely hide a divider of a  
NSSplitView.


Suppose I have a split view setup like this:

  A  B
|--|--|

B is collapsible through a button, not through dragging (there is a  
min and max constraint on the divider too). I have a button that  
toggles the view from collapsed to expanded and back. However, when  
view is collapsed the divider is still visible on the right edge of  
the split view.


I've tried sizing the subviews myself in my own custom SplitView  
subclass - not using NSSplitView's -setPosition: - but even that  
doesn't help. The splitview somehow adjusts the the frames after  
they have been set so the divider stays visible, not matter what you  
do.


Instruments is an example of an app that has splitters that work  
like I want it. The Extended Details pane toggles on and off using a  
button (on the bottom toolbar). When collapsed there is no divider  
visible and you can expand it by using the button only.


Is that something I can do with NSSplitView? If so, how?

Regards
Markus
--
__
Markus Spoettl

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/md207%40doc.ic.ac.uk

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: How to hide the divider in a collapsed NSSplitView pane

2008-06-21 Thread Markus Spoettl

Hi Milen,

On Jun 21, 2008, at 6:21 PM, Milen Dzhumerov wrote:
A common UI pattern now is to provide a button to show and hide one  
subview or another of a split view, and completely hide the divider  
when the subview between it and the edge of the window is hidden. To  
make it easy for you to do this there is a new - 
splitView:shouldHideDividerAtIndex: delegate method you can  
implement.



Ahhh. That's great, I just tried. Thanks so much for the tip!

Regards
Markus
--
__
Markus Spoettl



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: How to hide the divider in a collapsed NSSplitView pane

2008-06-21 Thread Markus Spoettl

On Jun 21, 2008, at 5:53 PM, Andreas Mayer wrote:

The documentation for NSSplitView says:


dividerThickness
Returns the thickness of the divider.

- (CGFloat)dividerThickness

Discussion
You can subclass NSSplitView and override this method to change the  
divider’s size, if necessary.



I guess I didn't think of that, thanks for the tip. There's actually a  
better way that Milen pointed out, though.


Regards
Markus
--
__
Markus Spoettl



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: How to hide the divider in a collapsed NSSplitView pane

2008-06-21 Thread Andreas Mayer


Am 22.06.2008 um 03:58 Uhr schrieb Markus Spoettl:


There's actually a better way that Milen pointed out, though.


If you don't need to support systems earlier than 10.5, yes.


Andreas
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: How to hide the divider in a collapsed NSSplitView pane

2008-06-21 Thread Markus Spoettl

On Jun 21, 2008, at 7:53 PM, Andreas Mayer wrote:

There's actually a better way that Milen pointed out, though.


If you don't need to support systems earlier than 10.5, yes.


Yes, that's right. I forgot to mention that.

Regards
Markus
--
__
Markus Spoettl



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]