Use either: CtlShowObject(GetObjectPtr(yourbuttonResID); CtlHideObject(GetObjectPtr(yourbuttonResID);
Sometimes with the usable function as well. Or (These may have been depricated and you might need to use a Frm function instead) I believe the frm functions aren't immediate, it takes a frmDraw or redraw to make them dissapear. If you do the hide/show before your FrmDrawForm() function then they won't be seen at all. It's also likely that all this does is toggle the usable bit in the control too I have not looked at the OS source. But I could be wrong. -Good Luck. ----- Original Message ----- From: "Edward P. Ross" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Saturday, March 09, 2002 6:21 PM Subject: Re: Set button usable > Hi Joe, > > Thanks for the tips - maybe I asked the wrong thing. I wanted the buttons to be visible/invisible and I thought that you are > supposed to use the usable property for that... Can you clarify? > > Thanks, > Ed > > Joe wrote: > > > --- "Edward P. Ross" <[EMAIL PROTECTED]> wrote: > > > I am a newbie to programming with CodeWarrior > > > ... > > > I have a form with two buttons. > > > Upon opening the form I want button 1 set to > > > usable and button 2 usable (programmatically). > > > > Do that inside of MainFormInit(). Did you mean you want both usable, > > or was one of them supposed to be unusable? (Note: It is generally > > considered a bad thing to have visible controls that are unusable.) > > > > > > > > Then when I click on either button I want the > > > buttons to switch their usable field. > > > > Add a ctlSelectEvent case to your MainFormHandleEvent() and respond to > > button taps there. > > > > However, if tapping a button makes it unusable, how do you expect to > > make it usable again? (Or, did you mean that when you tap button 1, it > > becomes unusable and button 2 becomes usable, and vice versa?) > > > > __________________________________________________ > > Do You Yahoo!? > > Try FREE Yahoo! Mail - the world's greatest free email! > > http://mail.yahoo.com/ > > > > -- > > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
