Reworked tab widget so that tabs can be activated programatically