• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom NSButton highlight and state
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Regex pattern to find URLs
  • Next by Date: Re: Programmatically resizing a view which contains an NSTabView
  • Previous by thread: Re: AppleEvents in Foundation tool (not working)
  • Next by thread: dynamically adding and binding NSTableColumns
  • Index(es):
    • Date
    • Thread