I use the following code to check for a field with selected text when a
control (graphic button) is selected. If such a field exists I process its
selected text as part of handling the selected control. Works fine except on
the Treo (simulator). On the Treo FrmGetFocus returns null. I have checked
as early as the ctlEnterEvent and found that null will be returned. Does
anyone know of this problem or a work around for the problem?

FieldPtr getFocusField(const FormPtr formP) {
  FieldPtr fldP = NULL;
  UInt16 objIndex = FrmGetFocus(formP);
  if(objIndex != noFocus && FrmGetObjectType(formP, objIndex) ==
frmFieldObj) {
    fldP = (FieldPtr)FrmGetObjectPtr(formP, objIndex);
  }
  return fldP;
}


Ralph



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

Reply via email to