Back Tab To Last Field In DataWindow
I found a good tutorial on datawindow. if you want to go back to last column when change datawindow is selected by shift + tab
datawindow event Getfocus:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | Long ll_col = 1 Long ll_pos, ll_x, ll_y, ll_tab Long ll_curr_x, ll_curr_y String ls_list, ls_piece, ls_column, ls_setting // user back tabbed to get here If KeyDown(keyshift!) And KeyDown(keytab!) Then // objects on datawindow ls_list = This.Object.datawindow.objects + '~t' Do While ls_list <> '' ll_pos = Pos(ls_list, '~t') If ll_pos > 0 Then ls_piece = Mid(ls_list, 1, ll_pos - 1) ls_list = Trim(Mid(ls_list, ll_pos + 1)) If Trim(ls_piece) <> '' Then ls_setting = This.Describe(ls_piece + '.Type') If Upper(ls_setting) = 'COLUMN' Then // only look at columns ls_setting = This.Describe(ls_piece + '.Visible') //check for visible only If ls_setting = "1" Then ls_setting = This.Describe(ls_piece + '.X') ll_x = Long(ls_setting) ls_setting = This.Describe(ls_piece + '.Y') ll_y = Long(ls_setting) ls_setting = This.Describe(ls_piece + '.TabSequence') ll_tab = Long(ls_setting) //check tab sequence If ll_tab > 0 And ((ll_y = ll_curr_y And ll_x > ll_curr_x) Or (ll_y > ll_curr_y)) Then ll_curr_x = ll_x ll_curr_y = ll_y ls_column = ls_piece End If End If End If End If End If Loop If Trim(ls_column) <> '' Then This.SetRow(Long(This.Object.datawindow.LastRowOnPage)) This.SetColumn(ls_column) End If End If |
Get From The anvil-of-time.com. Thank you for sharing.
Good Luck!