tabOptions.width = ~formwidth - 20
tabOptions.height = ~formheight - 20

# All tabs need to have this defined else they wont resize properly
#tabAdmins.width = $tabOptions.width - 20
#tabAdmins.height = $tabOptions.height - 20
#tabAdmins.width = $tabOptions.width - 20
#tabAdmins.height = $tabOptions.height - 20

#There's a bug with this, because the size of the Tabs is variable depending on the OS
#The resize will only affect the currently selected tab
#If you switch tabs, its elements will look out of balance. A simple resize
#On the selected tab solves the problem. I will have to work on a bugfix for that later on

# WORKS - $tabUsers are depth(1) from $tabOptions (!) - indirect value modification
channelAdmins.width = $tabAdmins.width - 20
channelAdmins.height = $tabAdmins.height - 20


#Announcements
#this is needed for cmdSave
#$tabAnnouncements.width = ~width
#this is needed for txtPreview and txtEdit
$tabAnnPreview.width = $tabAnnouncements.width
$tabAnnEdit.width = $tabAnnouncements.width


#cmdSave.X = 10 - ~is(os_mac) * 5
#cmdSave.Y = $tabAnnouncements.height - ~height - 5
#cmdSave.X = 0
cmdSave.Y = $tabAnnouncements.height - ~height
cmdSave.width = $tabAnnouncements.width

# tabAnnOptions
tabAnnOptions.width = $tabAnnouncements.width
tabAnnOptions.height = $cmdSave.Y
# subset

#FOR THIS TO WORK WITH $tabAnnPreview and $tabAnnEdit, the baseResize() function would need a 3rd loop, because it's a nested statement
#the baseResize() function only looks into a depth of 2, as that's all we need. The maximum on normal windows is 1, on this one it's 2
txtPreview.width = $tabAnnOptions.width
txtPreview.height = $tabAnnOptions.height
txtEdit.width = $tabAnnOptions.width
txtEdit.height = $tabAnnOptions.height
