Window Help

I am using a side tab control to switch the tab control windows on the bottom. I have three different ones. This works fine. The problem is that I want to open the first window of the tab at the same time. This is the code that I am trying to run on the tabs propertyChange script.

[code]value = fpmi.tag.getTagValue("[Client]CurrentWindow")

if event.propertyName == ‘selectedTab’:
if event.source.selectedTab == ‘Stills’:
value = ‘Still_7’
if event.source.selectedTab == ‘Alarms’:
value = ‘AlarmScreen’
if event.source.selectedTab == ‘Rectifiers’:
value = ‘Rectifier’

fpmi.tag.writeToTag(’[Client]CurrentWindow’, value)[/code]

I have tried this but it gives me a wrong syntax error on the value = ‘Still_7’ when I try to apply it.

I have been searching the forums and can’t quite find a solution that works.

Well I’m not entirely sure what you’re trying to do, but as far as the syntax error goes, it looks like you don’t have consistent indentation. Notice in your post how “fpmi.nav…” is indented differently than “value =”… This will throw Python for a loop since it uses indentation to define programmatic blocks. Try standardizing on tabs for indentation.

In my script it looked like the indentation was the same but was different. This fixed that but caused new problems. The screens were moving all over the place. But no I have fixed that by swapping the main screens, moving all the tabs onto the same screen and changing the visibility on the separate tabs. This allows me to group my screens together.

So you’re happy with how it works? I’m having a hard time following your latest post. I could help better if you post a copy of the window (right click in the “project browser” and click “export window”). That is - if you still have issues.

No I am happy with the way it is working but if you have a better way I am open for suggestions. I added a screen shot of the three screens together.

The Tabs on the left are one screen that will navigate between main groups.

The tabs on the bottom are another screen that will navigate the minor groups.

Then the screens in the middle were the screens that are changing.

This is not an end user program but I am just learning how to do things. I could put these all on on tab right now but with larger projects this will work well for navigation.