Change Tab of TabControl via Code

1k Views Asked by At

is it possible to change the currently selected tab of a tabControl in Dynamics NAV 2009 R2 via code?

Classic Client - Dynamics NAV 2009 R2

enter image description here

When I press the button 'Show second Tab', the tabPage should switch from the currently selected ('Allgemein') to 'Tab2'

I couldn't find anything about switching tabs in a tabControl in Navision

Thanks in advance

1

There are 1 best solutions below

1
On BEST ANSWER

You're right - there is no simple way to programmatically change the selected tab. What you could do, however, is use code to activate the first control on the desired tab. To do this, the OnPush of your "Show second Tab" button should contain:

CURRFORM.TheNameOfTheFirstControlOnTheSecondTab.ACTIVATE;