Re: Icon button with pop-up menu in toolbar?
Re: Icon button with pop-up menu in toolbar?
- Subject: Re: Icon button with pop-up menu in toolbar?
- From: Fredrik Olsson <email@hidden>
- Date: Tue, 13 Jun 2006 14:42:09 +0200
Håkan Waara skrev:
The trick is usually to override trackMouse: to provide this custom
behavior. For example, do a nextEventMatchingMask: with a timeout. If
it times out, it's a "click-hold" event, otherwise you just dispatch
the mousedown normally.
Someone already made a great class for this. IIRC it's called
AMRolloverButton or similar.
Otherwise, you can have a look at DraggableImageAndTextCell.mm in
camino's source code. Less than perfect, but does the job.
Thanks worked like a charm.
// Fredrik Olsson
/Håkan
12 jun 2006 kl. 16.36 skrev Fredrik Olsson:
Hi, no Google power today :/
What is the secret trick to implementing toolbar items that behaves
like "Build" and "Build and Go" in Xcode?
A default action for single click, and a delay popup-menu with
further action.
// Fredrik Olsson
_______________________________________________
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
_______________________________________________
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