Skip to Content
0
Sep 21, 2016 at 01:34 PM

Shift + tab feature of datawindow

37 Views

Hello Team. I need help in (shift+tab)key feature. I have a datawindow which has around 20 fields. They have tab sequence like 10, 20 till 200.

For illustration, let the name of field with tab sequence 10 be 'FirstColumn' and field with tab sequence 200 be 'LastColumn'.

If I do SHIFT+TAB in FirstColumn, the focus goes out of datawindow(triggers losefocus event). I want the focus to be on LastField.

I wrote below code in datawindow's losefocus event:

String ls_col_name

ls_col_name = DW.GetColumnName()

CHOOSE CASE ls_col_name

CASE 'FirstColumn'

DW.SetColumn('LastColumn')

DW.SetFocus()

END CHOOSE

The code works fine for SHIFT+TAB keypress but now if the focus is on 'FirstColumn' and I click on any button outside datawindow, again losefocus is triggered and focus goes to 'LastField'.

I am working on PB Classic 12.5.2 Build 5550. Please suggest a fix to the code or an alternate way of doing it.

Thank you,

Ashish