Klemen Dovrtel wrote:
I don't understand how to fill the table with TblSetCustomDrawProcedure. I was 
looking at diferent customdrawprocedures, bud i don't understand which part o 
code actually fills the table.


typedef struct
{
UInt16 number;
char text1[5];
char text2[20];
} DBRecordType;

static void Record(void *table, Int16 row, Int16 column,RectangleType *bounds)
{
MemHandle recordH;
DBRecordType *recordP;
Int16 i;
        
recordH=DmQueryRecord(gDB,0);
recordP=(DBRecordType*)MemHandleLock(recordH);
        
if(recordP->number)
//show it on table. But i dont know how...? else
return;
                
MemHandleUnlock(recordH);
}
TblSetItemStyle(table, i, 2, customTableItem);
TblSetCustomDrawProcedure(table,2,Record);


The custom draw procedure doesn't fill the table, but draws the corresponding table entry ( based on it's arguments ).

Juergen

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

Reply via email to