Create an IB "Informational Text" field Programatically
Create an IB "Informational Text" field Programatically
- Subject: Create an IB "Informational Text" field Programatically
- From: Bryan Rieger <email@hidden>
- Date: Mon, 22 Apr 2002 15:43:40 -0400
How do I create an NSTextField that is the same as IB's "Informational
Text" field at run time?
I can do this to get IB's "Message Text" field.
NSRect labelRect = NSMakeLabelRect( 10.0, 10.0 , 100.0, 22.0 );
NSTextField * labelField = [[NSTextField alloc] initWithFrame: labelRect];
[labelField setBordered: NO];
[labelField setBezeled: NO];
[labelField setSelectable: NO];
[self addSubview: labelField];
But this does not work for IB's "Informational Text"
SRect labelRect = NSMakeLabelRect( 10.0, 10.0 , 100.0, 14.0 );
NSTextField * labelField = [[NSTextField alloc] initWithFrame: labelRect];
[labelField setBordered: NO];
[labelField setBezeled: NO];
[labelField setSelectable: NO];
[self addSubview: labelField];
The text ends up bigger than the display rect.
TIA
Bryan Rieger
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.