Hi,

I'm learning how to use tables in my applications and am having a little
problem. Every row that does not contain an entry from my program's database
contains a checkbox. I don't have any checkboxes in the table.

Is there some initialization I need to be doing to ensure those rows without
data are empty when drawn?

Here is how I am setting things up in my drawMainForm function:
Thanks in advance,

Andy

    tableP = GetObjectPtr (MainCETable);
    
    numRows= DmNumRecords(CEDatabase);
    
    //set each row to usable and invalid if there is data to be drawn in
the row
    for (row = 0; row < numRows; row++, index++)
    {
        if (index < numRows)
        {
            TblSetRowUsable (tableP, row, true);
            TblMarkRowInvalid (tableP, row);
            TblSetItemStyle (tableP, row, 0, customTableItem);
            TblSetItemStyle (tableP, row, 1, customTableItem);
            TblSetItemStyle (tableP, row, 2, customTableItem);
        }
        else    //if not data in the row, make it unusable
        {
            TblSetRowUsable (tableP, row, false);
        }
    }
    
    for (i=0; i < 3; i++)    //set up the drawing function for each column
and set the column to usable
    {
        TblSetCustomDrawProcedure (tableP, i, drawCERecord);
        TblSetColumnUsable (tableP, i, true);
    }


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

Reply via email to