Hi
I'm using a table with three colums, initialized as below with two columns that are
handled with a custom draw procedure:
=========
#define numRows=11
#define numCols=3
for( i=0; i<numRows; i++ ) {
TblSetItemStyle( table, i, 0, checkboxTableItem );
TblSetItemInt( table, i, 0, 0 ); // set chkbox
init to unchecked
TblSetItemStyle( table, i, 1, customTableItem ); // item desc -
text
TblSetItemPtr( table, i, 1, NULL );
// nothing yet
TblSetItemStyle( table, i, 2, customTableItem ); // note icon
gadget
TblSetItemInt( table, i, 2, 0 );
// init to no note
}
for( i=0; i<numCols; i++ ) {
TblSetColumnUsable( table, i, true );
}
TblSetCustomDrawProcedure( table, 1, DrawCustomTableItem ); // set up for
display callback
TblSetCustomDrawProcedure( table, 2, DrawCustomTableItem );
=========
Primary targets at this point in development are Palm OS 3.1/3.5.
The problem occurs when I select column 1 which I fill with some text in the custom
draw procedure as follows:
======
err = FtrGet( sysFtrCreator,sysFtrNumROMVersion, &romVersion);
ErrFatalDisplayIf( err, "Bad Ftr call" );
if( romVersion >= sysVersion35 ) {
str = (Char*)TblGetItemPtr( table, row, col );
} else {
str = (Char*)TblGlueGetItemPtr( table, row, col );
}
ErrFatalDisplayIf( !str, "Bad table pointer" );
len = StrLen( str );
WinDrawChars( str, len, bounds->topLeft.x, bounds->topLeft.y );
===============
What I want to happen is that this selected row/column show up as "selected" when
actually selected with inverse text or colorized text (the actual text is fine!). In
POSE and on real device while pen down, selection is apparent, upon removal the
selection indication goes away. I've tried several variations with and without
TblSelectItem and other variations without success.
Anyone have an idea what's wrong? I've looked thru the limited OS sources and will
keep doing so but hoping for a quicker solution.
thanks
ernie
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/