no title bar, no tool tips
no title bar, no tool tips
- Subject: no title bar, no tool tips
- From: Matt Neuburg <email@hidden>
- Date: Wed, 26 Dec 2001 10:45:59 -0800
If a window is created with NSBorderlessWindowMask, tooltips don't function
in that window. Is this a bug?
To prove this to yourself, use this simple code:
#import "MyObject.h"
@implementation MyObject
- (void) awakeFromNib {
NSView* aView;
myWindow = [[NSWindow alloc] // an instance variable
initWithContentRect: NSMakeRect(0,0,100,100)
styleMask: NSBorderlessWindowMask
backing: NSBackingStoreBuffered
defer: NO screen: nil];
aView = [[NSView alloc] initWithFrame:
NSMakeRect (0,0,NSWidth([myWindow frame]),NSHeight([myWindow frame]))];
[[myWindow contentView] addSubview: aView];
[aView setToolTip: @"Howdy"];
[aView release];
[myWindow makeKeyAndOrderFront: self];
}
@end
Build and run. Put the mouse over the window content region; the tooltip
never shows up. But if you change it to NSTitledWindowMask, the tooltip
works fine.
m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei