• 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
Create an IB "Informational Text" field Programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Create an IB "Informational Text" field Programatically


  • Subject: Create an IB "Informational Text" field Programatically
  • From: Bryan Rieger <email@hidden>
  • Date: Mon, 22 Apr 2002 15:43:40 -0400

How do I create an NSTextField that is the same as IB's "Informational
Text" field at run time?

I can do this to get IB's "Message Text" field.

NSRect labelRect = NSMakeLabelRect( 10.0, 10.0 , 100.0, 22.0 );
NSTextField * labelField = [[NSTextField alloc] initWithFrame: labelRect];

[labelField setBordered: NO];
[labelField setBezeled: NO];
[labelField setSelectable: NO];
[self addSubview: labelField];


But this does not work for IB's "Informational Text"

SRect labelRect = NSMakeLabelRect( 10.0, 10.0 , 100.0, 14.0 );
NSTextField * labelField = [[NSTextField alloc] initWithFrame: labelRect];

[labelField setBordered: NO];
[labelField setBezeled: NO];
[labelField setSelectable: NO];
[self addSubview: labelField];

The text ends up bigger than the display rect.

TIA

Bryan Rieger
email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Create an IB "Informational Text" field Programatically
      • From: Vince DeMarco <email@hidden>
  • Prev by Date: Show Auxilliary Panel first in Print Panel
  • Next by Date: Re: Using NSSocketPort
  • Previous by thread: Show Auxilliary Panel first in Print Panel
  • Next by thread: Re: Create an IB "Informational Text" field Programatically
  • Index(es):
    • Date
    • Thread