In layout mode, click on your tab control, then click the first tab panel so that it is selected. Then use the Name box in the top of the Inspector's postion tab to give it an object name.
Now the script step: Go To Object ["put object name here"]
Will select that tab panel and bring it to the front.
On your second question, you cannot use layout mode to change the width of the window. You can, however, modify the design of your layout so that the objects in it do not extend as far to the right as they currently do. There are also script steps: Move/resize Window and Adjust Window [resize to fit] that can be used to resize the window to better fit your display.
Great, thanks so much, that worked well.
Also, I assume it's not too hard to have a certain answer go to a certain tab? So if a radio button says "Yes" it goes to tab1, if says "No" goes to tab2.
Just give each tab panel it's own object name.
If [YourTable::radiobuttonfield = "yes"]
Go to object ["FirstPanel"]
Go to object ["secondPanel"]
Great, thanks again. I'm sorry, what do I fill in at the "YourTable" field? Am I correct that I don't have to specify the question yet because I then attach the script to that field?
When you refer to a field in a calculation in a script, you must refer to the table and the field both. In place of "yourtable" use the name of your table. In the specify calcualtion dialog, you can just double click the field in the list of fields and it will be added with accompanying table occurrence name automatically. This should be a reference to the the field you've formatted as a radio button.
Thanks. That script works, though my problem is that it doesn't work right when an answer is filled in, only when the script is run (I guess it isn't attached to the field yet?). Is there a next step I'm missing that would accomplish that? If I attach the script to the field under button setup it seems to just turn it into a traditional button.
- Enter layout mode.
- Right click the radio button field (or do the mac equivalent)
- Select script triggers.
- Select the OnObjectModify trigger and set it to run this script.