Would someone please tell me why this text field will not show. It is driving me spastic.
The window and text field are valid. And there are no errors.
The window shows but the text field does not.
relativeToWindow is valid.

NSRect w=[relativeToWindow frame];
NSRect r={{NSMaxX(w)-96, NSMaxY(w)-ToolbarHeightForWindow(relativeToWindow) - titleBarHeight(relativeToWindow)-24},
        {256, 64}};
window=[[NSWindow alloc] initWithContentRect:r styleMask:0
        backing:NSBackingStoreRetained defer:NO];

//[window setBackgroundColor:[NSColor redColor]];
[window makeKeyAndOrderFront:self];
//[window setAlphaValue:0.3];
[relativeToWindow addChildWindow:window ordered:NSWindowAbove];
[window setLevel:NSFloatingWindowLevel];

f.origin.x=4;
f.origin.y=4;
f.size.width=128;
f.size.height=32;
textInfo=[[NSTextField alloc] initWithFrame:f];
[textInfo setSelectable:NO];
NSFont* font=[NSFont fontWithName:@"Times-Roman" size:12];
[textInfo setFont:font];
[textInfo setStringValue:@"hello world"];
[textInfo setBackgroundColor:[NSColor blueColor]];
[[window contentView] addSubview:textInfo];
_______________________________________________

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