Re: Apps whitout nib
Re: Apps whitout nib
- Subject: Re: Apps whitout nib
- From: James Chen <email@hidden>
- Date: Wed, 18 Feb 2004 10:02:28 +0800
Hi Wezzy,
I'm sure what you really want. Anyway I set BezelStyle of the button so
that looks more like a button now.
You may try to set the other type which suit you.
int main(int argc, const char *argv[])
{
NSWindow * win;
NSApplication * app;
NSRect contentRect;
NSButton * bt;
NSAutoreleasePool * pool;
pool = [[NSAutoreleasePool alloc] init];
contentRect = NSMakeRect(0,0,330,330);
win = [[NSWindow alloc] initWithContentRect:contentRect
styleMask:(NSTexturedBackgroundWindowMask | NSTitledWindowMask |
NSClosableWindowMask | NSMiniaturizableWindowMask)
backing:NSBackingStoreBuffered defer:1];
bt = [[NSButton alloc] initWithFrame:contentRect];
[win setTitle:@"Test Window"];
[bt setBezelStyle:NSThickerSquareBezelStyle];
[win setContentView:bt];
[win setDelegate:bt];
//[win makeKeyAndOrderFront:nil];
app = [NSApplication sharedApplication];
[app runModalForWindow:win];
[app release];
[pool release];
return NSApplicationMain(argc, argv);
}
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
On Feb 17, 2004, at 6:48 PM, Wezzy wrote:
Il giorno 17/feb/04, alle 02:38, James Chen ha scritto:
Hi,
try using NSBackingStoreBuffered instead of NSBackingStoreNonretained
win = [[NSWindow alloc] initWithContentRect:contentRect
styleMask:(NSTexturedBackgroundWindowMask | NSTitledWindowMask |
NSClosableWindowMask | NSMiniaturizableWindowMask)
backing:NSBackingStoreBuffered defer:1];
Should be better,
James
I've also tried with NSBackingStoreBuffered but i have the same
strange behavior ....
Enyway thanks for your help
Wezzy
_______________________________________________
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.