Actually it works fine on the OS5 similator.  I believe that's what the 
functions FldGetAttributes and FldSetAttributes are for.  If we're not allow to 
do this, then it really shouldn't be in the OS5 SDK's API and maybe glue 
functions should be provided instead.


On 3 Apr 2003 at 13:14, Dave Lippincott wrote:

> I wouldn't work with the field attributes directly.  This will not work with
> OS 5 or newer versions.  Try running this code in Pose and see how many
> complaints you get.
> Best bet it to directly draw the text into the table cell.  Then the text
> won't be editable, underlined or hi-lightable.
> 
> ----- Original Message -----
> From: "Jeff" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Thursday, April 03, 2003 12:56 PM
> Subject: Re: non-editable text in a table
> 
> 
> > Thank you all for the many good ideas to choose from... I ended up using
> > Veronica's suggestion about modifying the attributes of the fields during
> > the load table callback function and it does exactly what I was hoping,
> make
> > the text in the table non-editable.  Here is the code frag that solved my
> > problem for anyone else who might be interested.  Thanks again, Jeff.
> >
> >
> > static Err MyTableLoadDataFuncType(void *tableP,
> >                                        Int16 row,
> >                                        Int16 column,
> >                                        Boolean editable,
> >                                        MemHandle *dataH,
> >                                        Int16 *dataOffset,
> >                                        Int16 *dataSize,
> >                                        FieldPtr fld)
> > {
> >   Boolean temp;
> >   FieldAttrPtr ptrFieldAttr;
> >
> >   temp = editable;            // for debug
> >   if(row < TABLEROWS)
> >   {
> >      FldGetAttributes(fld, ptrFieldAttr);
> >      ptrFieldAttr->editable = 0;
> >      ptrFieldAttr->underlined = noUnderline;
> >      FldSetAttributes(fld, ptrFieldAttr);
> >      *dataH = hdlTableText[row];
> >      *dataOffset = 0;
> >      *dataSize = 128;
> >   }
> >   return false;
> > }
> >
> >
> > Veronica Loell <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > >
> > > Another perhaps better solution is to alter the attributes of the field
> > > object that is created with default settings for the offending cells.
> > > call FldGetAttributes to get your FieldAttrType struct, change the
> > > attributes in question and apply them with FieldSetAttributes.
> > > This of course is done in the load-function.
> > >
> > > - Veronica
> > >
> > > Michel.P wrote:
> > > > The problem with using a label in tables is that it
> > > > will always add a colon ':' to the text, so the second
> > > > option might be only solution (albeit also a little
> > > > more complicated).
> > > >
> > > > Michel.P
> > >
> > >
> > >
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
> http://www.palmos.com/dev/support/forums/
> 
> 


John Leung
[EMAIL PROTECTED]
http://persweb.direct.ca/jleung


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

Reply via email to