I forgot,
the other problem I get using the child window is that the child window
never gets active. Even if I override
    - (BOOL)canBecomeKeyWindow { return YES;}
I can't click and activate any textField nor a tableView... not even the
keyboard works.

I create the child window this way
MyChildWindow *childWindow = [[MyChildWindow alloc]
initWithContentRect:aFrame styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered defer:NO];

[self setBackgroundColor:[NSColor clearColor]];
[self setOpaque:NO];
[self setAlphaValue:.999];
[self setIgnoresMouseEvents:NO];

Cannot really guess what I miss here.


Regards
-- Leonardo


> Da: Leonardo <mac.iphone....@gmail.com>
> Data: Thu, 16 Jun 2011 01:10:15 +0200
> A: Jens Alfke <j...@mooseyard.com>
> Cc: Cocoa Developers <cocoa-dev@lists.apple.com>
> Conversazione: addChildWindow and hiding the toolbar
> Oggetto: Re: addChildWindow and hiding the toolbar
> 
>> [[[drawer contentView] window] setAlphaValue: 0.5];
> This makes the whole drawer transparent. I would indeed drawn my own shape
> using a picture. So I thought to set the window transparent and the content
> opaque.
> 
>> It¹s easier to observe NSWindowDidResizeNotification.
> I am gonna try that out. Thank you Jens.
> 
> Regards
> -- Leonardo
> 
> 
>> Da: Jens Alfke <j...@mooseyard.com>
>> Data: Wed, 15 Jun 2011 13:34:34 -0700
>> A: Leonardo <mac.iphone....@gmail.com>
>> Cc: Cocoa Developers <cocoa-dev@lists.apple.com>
>> Oggetto: Re: addChildWindow and hiding the toolbar
>> 
>> 
>> On Jun 15, 2011, at 1:23 PM, Leonardo wrote:
>> 
>>> I need a transparent NSDrawer, so since I can't get it
>> 
>> Have you tried something like
>> [[[drawer contentView] window] setAlphaValue: 0.5];
>> ?
>> 
>>> So my question is, how to resize the infoWindow too?
>>> I tried to override the methods:
>>> 
>>> - (void)setFrame:(NSRect)windowFrame display:(BOOL)displayViews
>>> - (void)setFrame:(NSRect)windowFrame display:(BOOL)displayViews
>>> animate:(BOOL)performAnimation
>> 
>> It¹s easier to observe NSWindowDidResizeNotification.
>> 
>>> and resize the infoWindow programmatically whenever the parentWindow get
>>> resized, but the resize-animations of the 2 windows occur one after the
>>> other one. Not together.
>> 
>> Don¹t animate your window¹s resize. Just immediately resize it when you get
>> the notification.
>> 
>> ‹Jens


_______________________________________________

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