Re: How to make NSSplitView not dragable

2009-05-04 Thread Uli Kusterer

On 28.04.2009, at 18:44, Ashish Tiwari wrote:
I have a horizontal NSSplitView, I want the splitter bar should  
remain in a fixed postion and user should not be able to change size  
of upper subview or lower subview by dragging it.

Note: Split bar should be visible but not be drag able.



 You don't need a split view in that case. Just create the two views  
and leave a little gap between them, and set the resize springs and  
struts accordingly. If you can't produce the desired results that way,  
you might have to write a bit of code to position the two subviews  
manually.


Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://www.zathras.de





___

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 arch...@mail-archive.com


Re: How to make NSSplitView not dragable

2009-04-29 Thread Benjamin Dobson


On 28 Apr 2009, at 17:44:38, Ashish Tiwari wrote:


Hi All,

I have a horizontal NSSplitView, I want the splitter bar should  
remain in a fixed postion and user should not be able to change size  
of upper subview or lower subview by dragging it.

Note: Split bar should be visible but not be drag able.

Thanks,
Ashish


@implementation DisabledSplitView

- (void)awakeFromNib
{
[self setDelegate:self];
}

- (NSRect)splitView:(NSSplitView *)theSplitView effectiveRect: 
(NSRect)proposedEffectiveRect forDrawnRect:(NSRect)drawnRect  
ofDividerAtIndex:(NSInteger)dividerIndex

{
// Effectively disables splitter
return NSZeroRect;
}

- (void)drawDividerInRect:(NSRect)aRect
{
// Do nothing
}


@end

___

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 arch...@mail-archive.com


How to make NSSplitView not dragable

2009-04-28 Thread Ashish Tiwari
Hi All,

I have a horizontal NSSplitView, I want the splitter bar should remain in a 
fixed postion and user should not be able to change size of upper subview or 
lower subview by dragging it.
Note: Split bar should be visible but not be drag able.

Thanks,
Ashish


DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
___

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 arch...@mail-archive.com


Re: How to make NSSplitView not dragable

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 12:44 PM, Ashish Tiwari
ashish_tiw...@persistent.co.in wrote:
 I have a horizontal NSSplitView, I want the splitter bar should remain in a 
 fixed postion and user should not be able to change size of upper subview or 
 lower subview by dragging it.

What have you tried?  Specifically, have you tried any of the
NSSplitView delegate methods?

Why do you want to draw a splitter if the user can't move it anyway?

--Kyle Sluder
___

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 arch...@mail-archive.com