Re: NSSegmentedControl drawing problems in unified toolbar
Re: NSSegmentedControl drawing problems in unified toolbar
- Subject: Re: NSSegmentedControl drawing problems in unified toolbar
- From: Keith Blount <email@hidden>
- Date: Mon, 6 Feb 2006 10:46:17 -0800 (PST)
Thanks for the reply.
> If you're wondering how to keep the top two pixels
> from being chopped off (like I was) then just make
> the frame two pixels taller from within the code.
I had no end of problems getting segmented controls to
look right through IB (images in the wrong place,
height problems etc), so I now just use an NSView in
IB with its class set to NSSegmentedControl and do all
the set up in code...
> You can't stop the thing from redrawing it style
> based on being dragged/toolbar size/toolbar position
> change AFAIK unless you do custom drawing.
I guess I'll have to subclass and do the drawing
myself... Annoying. There must be a private method
that checks the window style before drawing - it's a
shame there's no way of just overriding this.
CocoaTech's excellent Finder replacement, PathFinder,
gets around this - they use metallic-style segmented
cells in their unified toolbar and have no problems in
their toolbar pallette or when the toolbar is hidden
and revealed again. Checking with F-Script Anywhere, I
see that they use a custom NSSegmentedCell subclass,
NTSegmentedCell, so I guess I will need to subclass
that and deal with drawing myself... Very frustrating
given that this is a standard Cocoa control that has
been around for a couple of years now.
Cheers,
Keith
----
FROM : Seth Willits
DATE : Mon Feb 06 19:25:50 2006
On Feb 6, 2006, at 10:17 AM, Keith Blount wrote:
> Someone posted a similar question to the list a
> year-and-a-half ago (see below)
I posted one in December too. :)
> Does anybody know how to fix this behaviour? I guess
I
> need to file a bug, but I'm hoping there's a fix
> anyway...
Funny you guys should mention this as I just was
working on it again
last night. There are already at least two bugs filed
on it and no
workarounds. If you're wondering how to keep the top
two pixels from
being chopped off (like I was) then just make the
frame two pixels
taller from within the code.
You can't stop the thing from redrawing it style based
on being
dragged/toolbar size/toolbar position change AFAIK
unless you do
custom drawing.
--
Seth Willits
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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