Symptom
If you have a DataWindow control with tab-order set to 0, you are not able to get focus to the control by using the TAB button, but you can still click on the control with the mouse and give it focus. Unlike other controls like a MultiLineEdit with TabOrder set to 0, the GetFocus event will not fire in a DataWindow control under these circumstances.
Environment
PowerBuilder
Reproducing the Issue
-
Create a small application with two DataWindow controls on a window
-
Set taborder to 0 for one of the DataWindow controls
-
Code GetFocus and LoseFocus events on both controls to inform you that they have been triggered (through MessageBoxes, or output in a MultiLineEdit)
-
Click the two DataWindow controls and observe what events get triggered.
Solution
No solution is available at the moment.
Possible workaround: Manually trigger the GetFocus event from the Clicked event of the DataWindow control: this.TriggerEvent(GetFocus!)
Please be aware that this will cause the ordering which the events fires to differ from other controls (Clicked event will fire before GetFocus).