Oops! I guess I won't use FrmGetObjectIndex(), since
the title does not have an ID to pass into FrmGetObjectIndex().

Instead I'll use the following code, with gratitude to Marianne
for the suggestion....

unsigned FrmGetTitleIndex(FormType *frm) {
    unsigned index = 0,
             numObjects = 0;
       
    if (!frm)
       return(0);
    
    numObjects = FrmGetNumberOfObjects(frm);   
    
    for (index = 0;  index < numObjects;  ++index) {
       if (frm->objects[index].objectType == frmTitleObj)   
          return(index);
    } /* for */  

    return(frmInvalidObjectId);
    
} /* FrmGetTitleIndex */



/*  Scott Herman
  */





At 10:15 AM 7/26/01 -0400, Scott Herman wrote:
>Thanks Marianne,
>
>I'll try that, however, I'll use FrmGetObjectIndex()
>rather than pawing through the form structure(s).
>
>Thx again,
>
>Scott Herman
>
>
>At 09:36 PM 7/26/01 +0000, TargetPlot Software wrote:
> >Hi,
> >Do you hide the Title object before changing it ?
> >I've found that something like this works...
> >  FrmHideObject(frm, FormTitleIdx);
> >  FrmSetTitle(frm, FormTitleStr);
> >  FrmShowObject(frm, FormTitleIdx);
> >
> >BTW, I do not know an easy way to find the FormTitleIdx. I look through
> >all objects on the form until I find one with an object type of
> >frmTitleObj. If anyone has a better way to find the object index of the
> >frmTitleObj, I'd like to know.
> >Regards,
> >Marianne.
> >------------------------------------------
> >Trevor Hancock & Marianne Rieckmann
> >TargetPlot Software
> >http://www.targetplot.com.au
> >mailto:[EMAIL PROTECTED]
> >mailto:[EMAIL PROTECTED]
> >------------------------------------------
> >
> >
> >-- 
> >For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/
>
>
>-- 
>For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


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