You could intercept events before the system does, check to see if
they're penDown events inside your button, and prevent the system from
seeing them, but that's not going to give the user a visual clue that
the button is disabled.  Perhaps you could also change the text of the
button to let the user know it's disabled.

However, the solution that would give a result that's probably closest
to what you'd like is to use a gadget to roll your own button form
object.  It's really not that difficult (not _too_ much code), and
making it grey-ed out is easy because you'd be entirely responsible for
it's drawing routines.  You'd need drawing, maintenance
(creation/destruction), and event handling routines, but done correctly
(perhaps abstracted away in a class), it should be totally reusable.


-----Original Message-----
From: Dan Samber [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 8:59 AM
To: Palm Developer Forum
Subject: Gray Button



According to the archives, there is no way to "gray" a button to
show that it is disabled. One can either :

1) Set it "unusable"- so it isn't drawn at all
2) Use some other technique that makes it "read only" (so that it
is drawn but does not generate events).

Is there a easy way to do this? The relevant posts were old... so
I figured I'd ask again.

Thanks!

Dan


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to