Re: Placing an Image next to a UI element

2011-11-26 Thread David Mirabito
Thanks for the tips Fritz, To address a couple of your points: * Yes, my 'make the image square' method is a bit of a hack. It really should be a fixed size and centred with respect to the textbox I'm drawing attention to. That was stage 2 after getting it positioned correctly :) * Thanks for

Re: Placing an Image next to a UI element

2011-11-25 Thread Fritz Anderson
On 25 Nov 2011, at 7:45 AM, David Mirabito wrote: > I am trying to place an InvalidData icon next to offending input elements > (popup menus, text fields, etc). I calculate the position of the new > NSImageVIew based on the frame of the UI element. Keep it's vertical > placement, and shift the

Re: Placing an Image next to a UI element

2011-11-25 Thread Fritz Anderson
On 25 Nov 2011, at 7:45 AM, David Mirabito wrote: >NSView *aview = theOffendingNSTextView; Is this in fact an NSTextView, or do you mean NSTextField? >NSView *superView = [aview superview]; > >NSRect oldframe = [aview frame]; > >NSRect newFrame = NSMakeRect( >oldfra

Placing an Image next to a UI element

2011-11-25 Thread David Mirabito
Hello, I am trying to place an InvalidData icon next to offending input elements (popup menus, text fields, etc). I calculate the position of the new NSImageVIew based on the frame of the UI element. Keep it's vertical placement, and shift the icon to the left if it, plus a small constant spaci