Tables and controlCell textboxes

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Tables and controlCell textboxes

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:31 pm

by Anonymous >> Fri, 30 Jan 2004 0:48:18 GMT

I have a table with textbox controls attached to columns 2 and 4. I would like the user to be able to use the arrow keys to move up or down in the column but i don't know how to gain control of the arrow keys. I tried coding the keypress event for both the table and the text box but it doesn't even seem to be firing the event. Also, the tabKey for the table is working but i would also like to skip over the uneditable cells. Is there a way to set the tabStop property to individual cells? or a tab index of some sort? Thanks for your time.
below is the code i used in my table keypress event;

tblSalesOrder_keyPress(table: Table input; keyCharCode: Integer io) updating;

vars
atTop, atBottom, atRight, atLeft : Boolean;
begin
if table.row = table.fixedRows + 1 then
atTop := true;
elseif table.row = table.rows then
atBottom := true;
elseif table.column = table.fixedColumns + 1 then
atLeft := true;
elseif table.column = table.columns then
atRight := true;
endif;

if keyCharCode = J_key_UpArrow and not atTop then
table.setCellSelected(table.row-1, table.column, true);
elseif keyCharCode = J_key_DownArrow and not atBottom then
table.setCellSelected(table.row+1, table.column, true);
elseif keyCharCode = J_key_LeftArrow and not atLeft then
table.setCellSelected(table.row, table.column-1, true);
elseif keyCharCode = J_key_RightArrow and not atRight then
table.setCellSelected(table.row, table.column+1, true);
endif;

end;

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 53 guests