Re: Custom NSButton image effects for pressed/disabled
Re: Custom NSButton image effects for pressed/disabled
- Subject: Re: Custom NSButton image effects for pressed/disabled
- From: "Lars C. Hassing" <email@hidden>
- Date: Thu, 13 Dec 2018 00:31:12 +0000
- Thread-topic: Custom NSButton image effects for pressed/disabled
The button should look like
+---+ +---+
| 1 | Title | 2 |
+---+ +—+
(try using Courier for the ASCII art)
I am looking for system functions to produce the SAME look and feel as Cocoa
controls.
Motif, Windows and Carbon all have system functions to draw control parts in
various states
to help developers achieve a consistent look and feel, why wouldn’t Cocoa be
interested in supporting that?
/Lars
> Den 12. dec. 2018 kl. 02.03 skrev Lars C. Hassing <email@hidden>:
>
> If I assign an image to an NSButton it is displayed with nice pressed and
> disabled effects.
>
> In my custom NSButton, that should display image1+title+image2, I override
> drawRect:, but how do I obtain the EXACT SAME system effects for the two
> images?
>
> I plan to use NSImage drawInRect:fromRect:operation:fraction:, it would be
> nice if it had an pressed/disabled/effect argument…
> /Lars
>
_______________________________________________
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