• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextField will not become editable in a borderless window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField will not become editable in a borderless window


  • Subject: Re: NSTextField will not become editable in a borderless window
  • From: Robert Cerny <email@hidden>
  • Date: Thu, 22 May 2008 14:18:27 +0200

You need to subclass NSTextField.

<http://www.cocoadev.com/index.pl?BorderlessWindow>

HTH
Robert


On 22.5.2008, at 14:13, Peter Burtis wrote:

When I add an NSTextField to a borderless window, nothing I do will make it editable. Specifically, running the code below, the text field just won't work. (I've tried it with all backing types, BTW.)

NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(300,300,300,300) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
NSTextField *field = [[NSTextField alloc] init];
[field setEditable:YES];
[window setContentView:field];
[window makeKeyAndOrderFront:self];


But change the styleMask to NSTitledWindowMask and it works as expected.

What am I missing? Is it impossible to do this for some reason? On the subject of NSBorderlessWindowMask, the docs give the rather opaque guidance, "Useful only for display or caching purposes," as if a window was useful for anything other than display. Is there some other, better way to create a completely custom window?

I'm running 10.5.2, if that matters.

Thanks,
Peter Burtis
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >NSTextField will not become editable in a borderless window (From: Peter Burtis <email@hidden>)

  • Prev by Date: Re: NSPasteboard Delegate
  • Next by Date: Re: NSPasteboard Delegate
  • Previous by thread: NSTextField will not become editable in a borderless window
  • Next by thread: Re: NSTextField will not become editable in a borderless window
  • Index(es):
    • Date
    • Thread