Good morning all,

Would somebody be so kind as to tell me the proper way to programatically
change the text on a push button (or other controls for that matter).  I'm
trying something like shown below, but sometimes it works and sometimes it
crashes.

ControlPtr pCtl;
CharPtr pChr;
pCtl = FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP,
SomeForm_SomePushButton));
pChr = CtlGetLabel(pCtl);
StrCopy(pChr,pSomeOtherText);
CtlSetLabel(pCtl,pChr);

I understand that the new text (pSomeOtherText) can't be longer than the
size of the push button's label when created in Constructor (right?), but
even when the new string is shorter it doesn't always work.

thanks in advance,
Marty

P.S. if there is a FAQ for this list, would somebody please post it or a
link to it.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to