Thanks for the quick reply. I am trying to get a command ID in my
event handler. Why does IB let you set a command ID that is never
returned to the app. Is not that a bug?
Jeremy
On Mar 27, 2007, at 4:03 PM, Eric Schlegel wrote:
On Mar 27, 2007, at 12:56 PM, Jeremy Sagan wrote:
I have a static text item created in a Nib with IB and I set its
command ID. When the user clicks on the static text item my event
procedure does not get called. Essentially I am using an icon with
static text to the right as a simulated control and I want the
icon to toggle when the user clicks on the text. It works fine if
the user clicks on the icon.
Assuming that your event handler is registered for a
kEventControlClick or kEventControlHit event, the problem is that
these events are only sent for controls that return a non-zero
partcode from kEventControlHitTest. The static text control ignores
clicks, so it returns zero. You can get hits on the control by
installing a kEventControlHitTest handler and setting the
ControlPart parameter value to a non-zero value and then returning
noErr. That will cause your Click or Hit handler to be called when
the user clicks and releases the mouse.
-eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden