• 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
Display NSTextView as Label - without InterfaceBuilder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Display NSTextView as Label - without InterfaceBuilder


  • Subject: Display NSTextView as Label - without InterfaceBuilder
  • From: Manuel <email@hidden>
  • Date: Mon, 13 Apr 2009 08:17:53 +0200

Hello

I would like to draw an NSTextField to an NSView but it should be displayed as a label.
In InterfaceBuilder it is no problem but how can I do that in sourcecode?


With this code it doesn't work. It is still displayed as a Textfield.

NSTextField *label = [[NSTextField alloc] init];
[label setEditable:FALSE];
[label setSelectable:FALSE];
[label setDrawsBackground:NO];
[myView addSubview:label];

Help would be nice...

Thanks...Manu
_______________________________________________

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


  • Follow-Ups:
    • Re: Display NSTextView as Label - without InterfaceBuilder
      • From: Graham Cox <email@hidden>
  • Prev by Date: Best way to pass large objects between tasks?
  • Next by Date: Re: Best way to pass large objects between tasks?
  • Previous by thread: Re: Best way to pass large objects between tasks?
  • Next by thread: Re: Display NSTextView as Label - without InterfaceBuilder
  • Index(es):
    • Date
    • Thread