CPButton fires actions and draws alternateImage when disabled
Reported by Tim Henrion | December 30th, 2008 @ 08:23 AM
Created a button with the following code and slapped it in a view:
_forwardButton = [[CPButton alloc] initWithFrame:CGRectMake( 22, 0, 22, 20 )];
[_forwardButton setBordered:NO];
[_forwardButton setImage:__forwardButton];
[_forwardButton setAlternateImage:__forwardButtonHighlighted];
[_forwardButton setImagePosition:CPImageOnly];
[_forwardButton setEnabled:NO];
[_forwardButton setTarget:self];
[_forwardButton setAction:@selector(_forwardClicked:)];
[_forwardButton sendActionOn:CPLeftMouseUpMask];
Notice that the button is disabled with setEnabled:NO. When I fire up my app, the button image appears to have been dimmed (looks like 0.5 alpha) but it is still clickable (it draws the alternateImage on mouse down) and fires its configured action on mouse up.
Comments and changes to this ticket
-
ronin-756 (at lighthouseapp) January 6th, 2009 @ 09:35 AM
A patch has been proposed and submitted to the dev mailing-list : http://github.com/suitmymind/cap...
-
ronin-756 (at lighthouseapp) January 10th, 2009 @ 06:42 AM
A new patch has been submitted : http://github.com/suitmymind/cap...
And is commented on the mailing-list : http://groups.google.com/group/o...
-
admin (at 280north) January 21st, 2009 @ 09:47 AM
- State changed from new to resolved
(from [8de321c780305fc6dac1d266f6f008038bf29244]) Final fix for buttons not working when disabled.
[#188 state:resolved]
Reviewed by me. http://github.com/280north/cappu...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.
People watching this ticket
Referenced by
- 188 CPButton fires actions and draws alternateImage when disabled [#188 state:resolved]