Re: Trying to create a 1px width NSBox

2015-03-08 Thread Steve Mills
On Mar 8, 2015, at 14:02, Patrick J. Collins patr...@collinatorstudios.com 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

Trying to create a 1px width NSBox

2015-03-08 Thread Patrick J. Collins
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

Re: Trying to create a 1px width NSBox

2015-03-08 Thread Quincey Morris
On Mar 8, 2015, at 12:02 , Patrick J. Collins patr...@collinatorstudios.com wrote: Except it seems to have a default unchangable width of 5px... ??? In IB, if you set the metrics inspector tab to “Alignment” rather than “Frame”, it shows as 1, not 5. The actual frame of the NSBox view isn’t

Re: Trying to create a 1px width NSBox

2015-03-08 Thread edward taffel
derive your own custom class from NSView render how you like in - (void)drawRect:(NSRect)dirtyRect On Mar 8, 2015, at 3:02 PM, Patrick J. Collins patr...@collinatorstudios.com wrote: I am trying to create a playhead that will move across a waveform, and IB shows a Vertical line component

Drawing inside an NSImage?

2015-03-08 Thread Patrick J. Collins
I have an NSView which has in its drawRect: method: NSColor *backgroundColor = [NSColor colorWithPatternImage:self.image]; [backgroundColor setFill]; ... the image method does: -(NSImage *)image { if (!_image) { _image = [[NSImage alloc]

Re: Trying to create a 1px width NSBox

2015-03-08 Thread Patrick J. Collins
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. Well I guess I can ask the reverse question of, why does Apple waste their time creating and offering a

Re: Trying to create a 1px width NSBox

2015-03-08 Thread Graham Cox
On 9 Mar 2015, at 6:09 am, Steve Mills sjmi...@mac.com wrote: On Mar 8, 2015, at 14:02, Patrick J. Collins patr...@collinatorstudios.com 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..

Re: Trying to create a 1px width NSBox

2015-03-08 Thread Jerry Krinock
I did this cheesy hack – used a “Vertical Line” from the IB library to get a black line – until Yosemite when it became a gray line :( Do as Graham says. Draw your own line instead. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Trying to create a 1px width NSBox

2015-03-08 Thread Jonathan Hull
If you have layers enabled, you can just use an ordinary 1pt wide NSView and set the background color of its layer to black (or whatever color you want). No need to subclass. Thanks, Jon On Mar 8, 2015, at 12:02 PM, Patrick J. Collins patr...@collinatorstudios.com wrote: I am trying to

Re: Drawing inside an NSImage?

2015-03-08 Thread Ken Thomases
On Mar 8, 2015, at 6:12 PM, Patrick J. Collins patr...@collinatorstudios.com wrote: I have an NSView which has in its drawRect: method: NSColor *backgroundColor = [NSColor colorWithPatternImage:self.image]; [backgroundColor setFill]; ... the image method does: -(NSImage

Re: Trying to create a 1px width NSBox

2015-03-08 Thread Graham Cox
On 9 Mar 2015, at 11:22 am, Patrick J. Collins patr...@collinatorstudios.com 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