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

Reply via email to