Re: Can I do something when double click on a button?
Re: Can I do something when double click on a button?
- Subject: Re: Can I do something when double click on a button?
- From: Lance Bland <email@hidden>
- Date: Tue, 9 Apr 2002 20:23:04 -0400
On Tuesday, April 9, 2002, at 08:01 PM, Nicholas Riley wrote:
On Wed, Apr 10, 2002 at 01:59:20AM +0200, Ondra Cada wrote:
If you *do* want that, I guess you'd need to DIY: store the time of
each
click, and check whether the next click came soon enough (to be
considered
a doubleclick). In Cocoa, you'd need something like three, perhaps
five,
ObjC lines for that, I guess.
You should be able to examine the NSEvent's clickCount to see if it is
2.
and if not that then put the button (a cell equivalent) in a NSMatrix,
which does have a double click action, or override the event handling in
a button subclass to do what you want.
-lance
------------------------------------
Lance Bland
mailto:email@hidden
web charts at
http://www.vvi.com/products/chart
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.