As I understand it, these are the steps taken to launch a form as a dialog
(error checking etc not shown, for clarity):

  FormPtr frm = FrmInitForm(FORM_ID);
  FrmSetActiveForm(frm);
  /* Set fields etc here */
  control = FrmDoDialog(frm);

The problem I'm having is this. If I set the text of any fields on the form
immediately before the FrmDoDialog() (marked above), these fields appear on the
_existing_ form/ window if I follow the set text with a call to
FldDrawField()). If FldDrawField() is not performed, the fields never seem to
get updated on-screen.

If I don't perform the FldDrawField(), fields modified don't
get updated on the form if the form is loaded normally (i.e. not through
FrmDoDialog()).


It strikes me that I'd need two setText functions - one that draws the field
after setting the text, and one that doesn't.

  /* for Dialog forms */
  setFieldTextWithDraw(field, text);
  FrmDoDialog(frm);


  /* for non-Dialog forms */
  FrmGotoForm();
  /* other things here */
  setFieldTextWithoutDraw(field, text);

Is there any way to get the visibility of a field? I know FrmHideObject() and
FrmShowObject() exist but there don't seem to be any corresponding
FrmIsObjectVisible() or FldIsVisible() functions - or does FrmGetObjectIndex()
only return a good value if the object is visible?


Thanks,

Si.




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

Reply via email to