PowerBuilder ‘Gotcha’ – Selectionchanging event on Tab controls
Selectionchanging is an event on a tab control which is triggered, according to PowerBuilder help, ‘when another tab is about to be selected.’ From this description you might think that this means changing from one tab to another; this is only partially correct. This event is triggered also when the window opens.
Depending upon your program logic, you may want to check for an oldindex value of -1 – which indicates there is no previous tab – and RETURN out of the event as appropriate.