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:14:01 +1100
> On 9 Mar 2015, at 6:09 am, Steve Mills <email@hidden> wrote:
>
>> On Mar 8, 2015, at 14:02, Patrick J. Collins <email@hidden> wrote:
>>
>> I am trying to create a "playhead" that will move across a waveform, and
>> IB shows a "Vertical line" component which looks exactly what I want..
>> Except it seems to have a default unchangable width of 5px... ???
>> I tried setting the borderType property to NSNoBorder but that
>> made no difference.
>>
>> How can I get a simple 1px solid colored object that I can use for
>> this purpose?
>
> For a playhead, I think you'd be better off either creating a custom view subclass and handling drawRect:, or put an overlay on top of you waveform view and draw the playhead there.
+1
Not sure why you'd waste time trying to bend unsuitable UI components to your will instead of building a custom view.
It's super easy and it always does exactly what you design it to do.
--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