Hey Guys,
Thanks for your help, I have advanced! I'd appreciate it if you guys stuck
with me on this.
Here is my new code:
// Initialize the table used to display the day's appointments.
table = FrmGetObjectPtr (form, FrmGetObjectIndex (form, tblTimeSheet));
rowsInTable = TblGetNumberOfRows (table);
for (row = 0; row < rowsInTable; row++) {
// set the cell styles
TblSetItemStyle (table, row, ClmnDate, textTableItem);
TblSetItemStyle (table, row, ClmnHour, textTableItem);
TblSetRowUsable (table, row, true);
}
TblSetLoadDataProcedure (table, ClmnHour, AddPrjctField);
TblSetLoadDataProcedure (table, ClmnDate, AddPrjctField);
TblSetColumnUsable (table, ClmnDate, true);
TblSetColumnUsable (table, ClmnHour, true);
The code for the AddPrjctField function:
static Err AddPrjctField (void * table, Int16 row, Int16 column,
Boolean editable, MemHandle * dataH, Int16 * textOffset,
Int16 * textAllocSize, FieldPtr fld) {
}
Now, I know that AddPrjctField is where I need to be adding the text to the
various fields. I have one problem though. I am not so sure what to do. For
the moment, all I want to do is to have fields which I can write in. Then
I'll try and tackle the problem of getting the information from the database
once I have this basic step down (editable fields in the table).
Can anyone help me with this step?
Thanks heaps everyone :)
Cheers,
Scott.
"Scott Mebberson" <[EMAIL PROTECTED]> wrote in message
news:76587@palm-dev-forum...
>
> I really need some help with tables.
>
> I am trying to create a table and I am having a nightmare. I can't get it
to
> work, no matter what I do. I am trying to create a table with two columns,
> each of them set to textTableItem. I can't even get these to display, I
> don't know what I am doing wrong, here is my code.
>
> // Initialize the table used to display the day's appointments.
> table = FrmGetObjectPtr (form, FrmGetObjectIndex (form, tblTimeSheet));
>
> rowsInTable = TblGetNumberOfRows (table);
>
> for (row = 0; row < rowsInTable; row++) {
>
> // set the cell styles
> TblSetItemStyle (table, row, ClmnDate, textTableItem);
> TblSetItemStyle (table, row, ClmnHour, textTableItem);
> TblSetRowUsable (table, row, false);
> }
>
> TblSetLoadDataProcedure (table, ClmnHour, AddPrjctField);
> TblSetLoadDataProcedure (table, ClmnDate, AddPrjctField);
>
> TblSetColumnUsable (table, ClmnDate, true);
> TblSetColumnUsable (table, ClmnHour, true);
>
> AddPrjctField, has nothing in it, just a FrmCustomAlert call to let me
know
> when it is being called. Any ideas anybody?
>
> cheers,
>
> Scott
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/