NSTextField doesn't display text
- by Alexsander Akers
The NSTextField has a superview and a frame. It is fully visible and has the following declaration:
- (id) initWithFrame: (NSRect) frameRect {
if ((self = [super initWithFrame: NSMakeRect(0, 0, 300, 20)])) {
label = [[NSTextField alloc] initWithFrame: NSMakeRect(47, 1, 233, 18)];
[[label cell] setAllowsUndo: NO];
[[label cell] setLineBreakMode: NSLineBreakByTruncatingMiddle];
[[label cell] setScrollable: NO];
[label setBezeled: NO];
[label setBordered: NO];
[label setDrawsBackground: NO];
[label setEditable: NO];
[label setFont: [NSFont menuFontOfSize: 14.0f]];
[label setSelectable: NO];
[label setTextColor: [NSColor textColor]];
[self addSubview: label];
NSLog(@"%@", NSStringFromRect([label visibleRect]));
}
return self;
}