Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simulating button press (i.e, for return)



Title: Simulating button press (i.e, for return)
Hi everyone,

Had some legacy code that simulated a button press when the user typed return in a text field.  Wanted to make sure the button was highligted long enough to be seen (the window doesn't go away).  But it seems that HiliteControl() has become so deprecated as to no longer function on Snow Leopard:

        ::HiliteControl(cntl_ref(), kCtInButton);

        unsigned long  finalTicks;
    
        Delay(6, &finalTicks);

        ::HiliteControl(cntl_ref(), kCtActive);

Now obviously this isn't a good way to do this anymore.  But I have a Push Button control in a non-compositing window, so my attempts to do it using one of the HIView API yielded an error.

Any suggestions?

Stephen
 _______________________________________________
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

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.