[comp.sys.mac.programmer] Hiliting Buttons

kg1a+@andrew.cmu.edu (Kevin Michael Goldsmith) (05/09/91)

Is there a way to Hilite a button without disabling it?  I am stuck on
something.  I working on an interactive simulation, and I want someone
to click on a button, and then I will hilite it.  Then, I want them to
be able to click on the button again, and I can respond to it.  Anyone
have a clue?


Kevin Goldsmith
kg1a+@andrew.cmu.edu
kmg@isl1.ri.cmu.edu

Disclaimer: Disclaimer, I don't need no stinkin disclaimer.

ech@cbnewsk.att.com (ned.horvath) (05/09/91)

From article <Ac_8EQi00VpB83dFRZ@andrew.cmu.edu>, by kg1a+@andrew.cmu.edu (Kevin Michael Goldsmith):
> Is there a way to Hilite a button without disabling it?  I am stuck on
> something.  I working on an interactive simulation, and I want someone
> to click on a button, and then I will hilite it.  Then, I want them to
> be able to click on the button again, and I can respond to it.  Anyone
> have a clue?

Sure, you can use TrackControl as usual on the first click, then use
HiliteControl to permanently highlight the control.

If you do this, you will want to define a control (CDEF) with a third (or
even a fourth) visual state, so that the second click will give some visual
feedback.
-- 

=Ned Horvath=
ehorvath@attmail.com

wdh@well.sf.ca.us (Bill Hofmann) (05/13/91)

In article <Ac_8EQi00VpB83dFRZ@andrew.cmu.edu> kg1a+@andrew.cmu.edu (Kevin Michael Goldsmith) writes:
>Is there a way to Hilite a button without disabling it?  I am stuck on
>something.  I working on an interactive simulation, and I want someone
>to click on a button, and then I will hilite it.  Then, I want them to
>be able to click on the button again, and I can respond to it.  Anyone
>have a clue?

HiliteControl() will highlight whatever *part* you specify, with special
part codes for disabling (254, 255).  So if you have a simple button,
call HiliteControl(ctl, inButton), a radio button or check box, 
HiliteControl(ctl, inCheckBox), etc.

-Bill Hofmann