Greg,
I believe you can do that with a textTableItem. When your loading
procedure is called, the last parameter is a pointer to the field. Get
the attributes inside that function by calling
FieldAttrType attr;
FldGetAttributes(fld,&attr);
Then set
attr.justification = rightAlign;
attr.numeric = true;
Then set the attributes back to the field using
FldSetAttributes(fld,&attr);
How about that?
-Marty
> I could do that, but, I want this table I/O cell to be right justified
> and numeric only. Neither the textTableItem nor any of the other standard
> styles support this. I KNOW I can do it with the customTableItem style
> and fields if I can just get the field to accept Grafitti input. Somebody
> must have done this already.
>
> > Greg,
> >
> > How about setting the cell's style to textTableItem? That's what I do.
> >
> > -Marty
>
> Original Post:
> --------------
> > > >> I'm a newbie Palm programmer and need a little assistance.
> > > >>
> > > >> I'm trying to do something that I thought would be relatively
> simple
> > but
> > > >> is giving me a lot of problems. What I'm trying to do is set up
> some
> > > Fields
> > > >> for user I/O inside a table using the customTableItem style (ala
> the
> > > "sales"
> > > >> example in Rhodes & McKeehan)
> > > >>
> > > >> My basic approach in the main event handler is:
> > > >>
> > > >> case frmOpenEven:
> > > >> initailize the table by:
> > > >> set the rows usable
> > > >> mark the rows invalid
> > > >> set the column's style to customTableItem
> > > >> relocate the appropriate field into the table (row, column)
> > > location
> > > >> (by changing is rect entry)
> > > >> set the field as visible, editable, underlined, etc.
> > > >> set the field text to its initial value
> > > >> set the table column's CustomDrawProcedure
> > > >> set column usable
> > > >> draw the form with FrmDrawForm
> > > >> break
> > > >>
> > > >>
> > > >> case tblEnterEvent:
> > > >> set the table's editing attribute to true
> > > >> set table's currentRow to the row selected by user tap
> > > >> set table's currentColumn to the column selected by user tap
> > > >> remove the high light from the previously selected field
> > > >> get a pointer to the field corresponding to selected table cell
> > > >> (row,column)
> > > >> set form focus to the table
> > > >> grab the focus for the selected field
> > > >> create a new fldEnterEvent
> > > >> call FldHandleEvent with the new fldEnterEvent and the field
> ponter
> > > >> break
> > > >>
> > > >> My CustomDrawProcedure simply uses FldDrawField to display each
> field
> > > >> when called at the appropriate time.
> > > >>
> > > >> Here's what happens:
> > > >>
> > > >> 1. The fields display properly in the table with their initial
> text.
> > > >>
> > > >> 2. I can select a field with a tap and high light any of the
> characters
> > > >> in the field.
> > > >>
> > > >> 3. I CAN NOT change anything (add or delete) in the field with
> > > >> Grafitti entries. It responds with the appropriate shift symbol
> > > >> to Grafitti shift entry and punctuation tap, but, I can't
> change the
> > > >> field text. It simply ignores all Grafitti entries.
>
>
> ---------------------------------------------
> This message was sent using MI-Webmail.
> No matter where you are, never lose touch.
> Get your Email using MI-Webmail.
> http://www.monmouth.com/
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html.
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html.