I am about 90% done with my table sample but I still
have two issues.

1) If I click on anyrow on the table the last col does
not get hightlighted.

2) The text in col 1 and col 2 is getting some funny
chars in it.

static void DrawRecord (void * table, Int16 row, Int16
column, RectanglePtr bounds)
{
        UInt16 recordNum;
        UInt16 rowHeight;
        Boolean fitWithinWidth;
        Int16 stringWidth, stringLength;
        
        FontID currFont;
        static Char drow[10];
        
        
        rowHeight = TblGetRowHeight((TablePtr)table, row);
        recordNum = TblGetRowID((TablePtr)table, row);
        
        currFont = FntSetFont(stdFont);
        
        if( column == 0)
        {
                stringWidth = 45;
                stringLength = stringWidth;
        
                StrPrintF( drow, "Row #  %d", row+1 );          
                FntCharsInWidth(drow, &stringWidth, &stringLength,
&fitWithinWidth);
                WinDrawChars(drow, stringLength, bounds->topLeft.x,
bounds->topLeft.y);
                if (!fitWithinWidth)
                        WinDrawChars("...", 3, stringWidth,
bounds->topLeft.y);
                        
                // Col1
                WinDrawGrayLine(bounds->topLeft.x + 50,
bounds->topLeft.y, bounds->topLeft.x + 50,
bounds->topLeft.y + rowHeight); 
                StrPrintF( drow, "Col1 %d", row+1 );            
                WinDrawChars(drow, stringLength, bounds->topLeft.x +
52, bounds->topLeft.y);
                
                //Col2
                WinDrawGrayLine(bounds->topLeft.x + 100,
bounds->topLeft.y, bounds->topLeft.x + 100,
bounds->topLeft.y + rowHeight); 
                StrPrintF( drow, "Col2 %d", row+1 );            
                WinDrawChars(drow, stringLength, bounds->topLeft.x +
102, bounds->topLeft.y);

                                        
                FntSetFont(currFont);   
                
                
        }
}

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

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

Reply via email to