In message <506500000005000000D64B0100-1073519706000@exchange.ni.com>,
LuisG writes
>Yes, you can do this fairly easily. All you have to do is catch the
>KEYPRESS event in the table's callback, and then change the active
>cell yourself, taking care to "swallow" the original event. The
>following code should do the trick:
>
>case EVENT_KEYPRESS:
> GetCtrlAttribute (panel, control, ATTR_TABLE_RUN_STATE, &state);
> if (state == VAL_EDIT_STATE)
> {
> keyCode = GetKeyPressEventVirtualKey (eventData2);
> if (keyCode == VAL_ENTER_VKEY)
> {
> GetActiveTableCell (panel, control, &cell);
> GetNumTableColumns (panel, control, &numColumns);
> if (cell.x < numColumns)
>
{
> cell.x++;
> SetActiveTableCell (panel, control, cell);
> SetCtrlAttribute (panel, control,
> ATTR_TABLE_RUN_STATE, VAL_EDIT_STATE);
> }
> return 1;
> }
> }
> break;
>
>Luis
>NI
That worked. Thanks Luis.
--
Regards,
John Cameron.