hi ,
I have set the properties of repeat buttons
(EditFormScrollUp,EditFormScrollDown) as false (while desiging)
and then somewhere in my code called the following function
void EditFormSetScroll( UInt8 from, UInt8 to)
{
UInt8 i = 0;
TableType *table = GetObjectPtr(EditFormTable);
ControlType * scrollUp = GetObjectPtr(EditFormScrollUp);
ControlType * scrollDown = GetObjectPtr(EditFormScrollDown);
for(i = 0 ;i < 6; i++){
if( i >= from && i <= to){
TblSetRowUsable(table , i ,true);
} else {
TblSetRowUsable(table , i, false);
}
TblMarkRowInvalid(table, i );
}
if(from == 0 && to == 5)
{
CtlSetLabel( scrollUp, "" );
CtlSetLabel( scrollDown, "" );
CtlSetEnabled( scrollUp, false );
CtlSetEnabled( scrollDown, false );
CtlSetUsable( scrollUp, false );
CtlSetUsable( scrollDown, false );
}else{
CtlSetUsable( scrollUp, true );
CtlSetUsable( scrollDown, true );
if( from != 0 && to < 5 ){
CtlSetEnabled( scrollUp, true );
CtlSetLabel( scrollUp, "\x01" );
CtlSetEnabled( scrollDown, true );
CtlSetLabel( scrollDown, "\x02");
} else if(from == 0){
CtlSetEnabled( scrollUp, false );
CtlSetLabel( scrollUp, "\x03" );
CtlSetEnabled( scrollDown, true );
CtlSetLabel( scrollDown, "\x02" );
} else if(to == 5){
CtlSetEnabled( scrollUp, true );
CtlSetLabel( scrollUp, "\x01" );
CtlSetEnabled( scrollDown, false );
CtlSetLabel( scrollDown, "\x04" );
}
But the strange thing which happens is that it works only if I set the two
repeat buttons as usable (during designing time)
Can Anboby please help me with this problem
Regards ,
Chintan
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/