Re: Trying to create a 1px width NSBox
Re: Trying to create a 1px width NSBox
- Subject: Re: Trying to create a 1px width NSBox
- From: Graham Cox <email@hidden>
- Date: Mon, 09 Mar 2015 11:43:19 +1100
> On 9 Mar 2015, at 11:22 am, Patrick J. Collins <email@hidden> wrote:
>
> Well I guess I can ask the reverse question of, why does Apple waste
> their time creating and offering a "vertical line", if it's not useful?
> I mean, all I want is a vertical line. I don't understand why something
> like that exists if it's not customizable.
It exists for its designed purpose, which is to create a visual separator between controls (in a dialog box, say), should you want that. In other words, a piece of window decoration. It's not designed to move (other than with the controls it's associated with if the window is resized), and it's definitely not intended to be used as a playhead in a sound playback situation.
Drawing a vertical line is trivial: +[NSBezierPath strokeLineFromPoint:toPoint:] for example, or CGContextStrokeLineSegments(), so why you'd go looking for a much more complicated object (an entire NSView subclass with all its attendant properties) to do that I can't think.
--Graham
_______________________________________________
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