In a form's event handler, I'm trying to respond to a control selection by
changing another control's label (the target is just a label). I copy the
new string into the control's ::text member and call CtlSetLabel like this:
ControlPtr pCtl = GetObjectPtr(res_id);
StrCopy(pCtl->text,"new string");
CtlSetLabel(pCtl,pCtl->text);
This function works fine when called from the form's Init function, but not
when I call it from the event handler (the string doesn't change at all).
If I force the entire form to redraw, using FrmDrawForm(), then the new
string is shown, but if it is shorter than the original string, some of the
original text is still shown (like it just drew the new string on top of the
old one). I've made sure that the string originally defined for the control
in Constructor is longer than the string I am copying into it later.
Any advice is appreciated.
Marty
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html