> I have a field defined in a form and in certain cases I need to hide the
> field.  The field is defined with the 'Underline' property checked (true)
in
> the Constructor.  I need to hide this line when I hide the field.  I am
not
> able to successfully do with the following code altenatives.
>
> // alternative 1
> fld = (FieldPtr) FrmGetObjectPtr (frm, FrmGetObjectIndex(frm, id));
> fld->attr.underlined = 0;
>
> // alternative 2
> FieldAttrType attr;
> FldGetAttributes(fld, &attr);
> attr.underlined = 0;   //noUnderline??
> FldSetAttributes(fld, &attr);
>
> ....
>
> CtlEraseControl (ctl);
> CtlSetUsable (ctl, false);
>
> ....
>
> FrmDrawForm(frm);

the FrmDrawForm resets the field attributes. You have to set them *after*
FrmDrawForm, and then call FldDrawField.


-- 
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