Custom NSButton highlight and state
Custom NSButton highlight and state
- Subject: Custom NSButton highlight and state
- From: "Mark's Studio" <email@hidden>
- Date: Sun, 7 Nov 2004 14:56:19 +0100
I have a Custom button with a custom cell, in the cell i do this to check if it's
NSMomentaryLightButton, or a on/off type.
- (BOOL)flag withFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
[ self setHighlighted:flag];
self showsStateBy])
[ self setState:0];
}
But if the button is NSMomentaryLightButton and it's used to switch to another tab, it will stay highlighted.
as far as i can see when a button is pressed the normal thing is
on mouseDown
highlight:YES
drawFrameInView:
on mouseUp
highlight:NO
drawFrameInView:
But if the tab is changed the function's after mouseUp are not called.
Peter Mark
Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden