On Tue, Mar 10, 2009 at 10:04 PM, Stuart Malin <stu...@zhameesha.com> wrote: > I am using an NSSegmentedControl in a toolbar to hold some mutually > exclusive selections. I invoke -setImage:forSegment: to set an image for > each, but the images are taller than the height of the segments. I don't > seem to have any control over that height with the NSRect I use to init the > segmented control. I have set the segmentStyle to NSSegmentCapsuleStyle, > which provides a bit more height. I have tried scaling the images to fit > (using -setImageScaling:forSegment) but then the images are too small. Is it > possible to override something somewhere to affect the cells that are used?
Try making your images smaller by using NSImage's setSize: method, or the million other ways to scale images on OS X. Once you have an image that's the right size, call -setImage:forSegment: with the scaled image. As far as resizing the NSSegmentedControl's height, there's no direct way to do it (as far as I can see). I've never seen an NSSegmentedControl that's a different height than stock anyway, so I wouldn't recommend doing it simply 'cause it'll look weird :) If you _really_ need a taller one, you could create your own custom control. It wouldn't be too hard, but I recommend making your images smaller to fit the stock control. Dave _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com