IB 3x plug-in: How to add custom control which is NSMatrix with custom controls inside?
IB 3x plug-in: How to add custom control which is NSMatrix with custom controls inside?
- Subject: IB 3x plug-in: How to add custom control which is NSMatrix with custom controls inside?
- From: Vyacheslav Karamov <email@hidden>
- Date: Fri, 06 May 2011 18:34:53 +0300
Hi All!
I have to support rather old project, so I had to rewrite IB 2x palette
in order to open project's NIBs.
In old IB 2x pallete code several instances of NSMatrix with custom
controls are created:
@implementation TLControlsPalettePalette
...
- (void)finishInstantiate
{
...
// CLRadioButtonCell matrix
NSMatrix* m = [[NSMatrix alloc] initWithFrame: NSMakeRect(10, 39,
64, 40)
mode: NSRadioModeMatrix
cellClass: [CLRadioButtonCell
class]
numberOfRows: 2
numberOfColumns: 1];
[m setIntercellSpacing: NSZeroSize];
[m setAutosizesCells: YES];
[m setCellSize: NSMakeSize(64, 20)];
NSEnumerator* en = [[m cells] objectEnumerator];
CLButtonCell* cell;
while (cell = [en nextObject]) {
[cell setTitle: @"Radio"];
[cell setBordered: NO];
}
[[[self originalWindow] contentView] addSubview: m];
[m release];
...
}
I tried to embed several Library Object Templates (with custom controls
inside) into NSMatrix but I couldn't.
How to create such matrices in IB 3x plug-in?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden