• 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
Small control size inside NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Small control size inside NSMatrix


  • Subject: Small control size inside NSMatrix
  • From: Rudi Sherry <email@hidden>
  • Date: Fri, 11 Feb 2005 09:05:27 -0800

I have a window in which I want to display a table of switches (checkboxes) and use the small control size. All the controls are Regular size, no matter what I call.

I populate the window programatically (I use an externally-supplied configuration file so I can't pre-populate it in Interface Builder).

In Interface Building, I made sure that the original cell inside the matrix was a switch whose size was set to "Small".

I use the following code to populate the matrix (both with and without the commented-out font-setting).

NSButtonCell *newButtonCell = [ [ [ NSButtonCell alloc ] init ] autorelease ];
[ newButtonCell setButtonType: NSSwitchButton ];
[ newButtonCell setControlSize: NSSmallControlSize ];
[ newButtonCell setAttributedTitle:
[ [ [ NSAttributedString alloc ] initWithString: myName ] autorelease ] ];
//[ newButtonCell setFont: [ NSFont controlContentFontOfSize:
// [ NSFont systemFontSizeForControlSize: NSSmallControlSize ] ] ];
[ newButtonCell setState: checked ? NSOnState : NSOffState ];
[ myMatrix putCell: newButtonCell atRow: myRow column: myColumn ];


... but the switches all appear in regular size. Other switches that I create as Small in IB for other purposes (and don't populate in the code) all correctly appear small in the window when I run it.

Is there something I'm missing?

Thanks,
Rudi

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSImage -> 1-bit NSBitmapImageRep
  • Next by Date: Re: Philosophy of FSRef - way
  • Previous by thread: Re: force end of editing and bindings
  • Next by thread: Xcode problem
  • Index(es):
    • Date
    • Thread