• 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
Custom control with 4 vertical sliders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom control with 4 vertical sliders


  • Subject: Custom control with 4 vertical sliders
  • From: Steve Mills <email@hidden>
  • Date: Fri, 15 Feb 2013 13:35:38 -0600

What's the easiest way to create a custom control that contains a matrix of 4 custom vertical sliders, like a mini graphic EQ? The sliders will not draw the slot, only the knob. First I started with a subclass of NSMatrix and a subclass of NSCell. No matter what I've tried, the cells always end up drawing at the wrong size, as if they were the cell for a simple text matrix, about 100 pixels wide and the height of a regular size text label. I create it thusly:

		MyMatrix*			blView = [[MyMatrix alloc] initWithFrame:NSMakeRect(100, 100, 200, 80) mode:NSTrackModeMatrix cellClass:[MyCell class] numberOfRows:1 numberOfColumns:4];

I've tried overriding all sorts of methods in the 2 subclasses; cellSize, cellFrameAtRow:column, even returning a cellSize of 10000,10000 as suggested in the docs for cells that aren't text or image cells.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



_______________________________________________

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: Custom control with 4 vertical sliders
      • From: Steve Mills <email@hidden>
  • Prev by Date: Re: [solved] Re: NSImage leaks open file in 10.8.2?
  • Next by Date: Re: Custom control with 4 vertical sliders
  • Previous by thread: Re: Binding a NSArrayController to a NSPopupButtonn & NSTextField
  • Next by thread: Re: Custom control with 4 vertical sliders
  • Index(es):
    • Date
    • Thread