It is currently Thu Apr 24, 2014 12:59 pm




Post new topic Reply to topic  [ 7 posts ] 
 Nav Bar / Left Bar 
Author Message
Trooper
Trooper

Joined: Wed Sep 09, 2009 1:23 pm
Posts: 16
Post Nav Bar / Left Bar
I am using the skeleton project template. Is there a way that I can change the nav bar with a button click on it.

I have three different types of facilities, Potable, Recycled and Wastewater. I would like to build 3 nav bars for those types and be able to switch the nav bars with buttons on the bars. Is this possible?

_________________
Brad L Daley
Systems Analyst
MNWD
OC, Ca.


Wed Mar 16, 2011 8:05 am
Profile
Moderator
Moderator

Joined: Wed Apr 18, 2007 11:00 am
Posts: 645
Location: Sacramento Ca.
Post Re: Nav Bar / Left Bar
Yes, just use the system.nav.swapWindow() function in your button to swap it to another nav window. More info here.

_________________
Robert McKenzie
Inductive Automation
Technical Support


Wed Mar 16, 2011 11:16 am
Profile WWW
Trooper
Trooper

Joined: Wed Sep 09, 2009 1:23 pm
Posts: 16
Post Re: Nav Bar / Left Bar
Guess I wasn't specific enough. I am not using Ignition. Im trying to swap the LeftNav and tabstrip that comes with the skeleton layout. Currently when I try to swap this tabstrip it swaps for the window that is open in the main area, Not the tabstrip itself. Do I have to disable the navagation mode and script all of the tabs?

_________________
Brad L Daley
Systems Analyst
MNWD
OC, Ca.


Thu Mar 17, 2011 8:00 am
Profile
Moderator
Moderator

Joined: Wed Apr 18, 2007 11:00 am
Posts: 645
Location: Sacramento Ca.
Post Re: Nav Bar / Left Bar
Ah yes, sorry. I didn't look at what forum you posted in. :oops:

Yes, you are exactly right. The Tab Strip component uses the swapTo() function where you want the swapWindow() function (in fpmi.nav). You will have to set the Tab strip Navigation Mode to 'Disabled' and add a script to the propertyChange event that takes the new selectedTab value and opens that window.

_________________
Robert McKenzie
Inductive Automation
Technical Support


Thu Mar 17, 2011 8:10 am
Profile WWW
Trooper
Trooper

Joined: Wed Sep 09, 2009 1:23 pm
Posts: 16
Post Re: Nav Bar / Left Bar
Getting an error message. Am I way off here?


Attachments:
tabstrip.doc [214 KiB]
Downloaded 156 times

_________________
Brad L Daley
Systems Analyst
MNWD
OC, Ca.
Thu Mar 17, 2011 11:12 am
Profile
Moderator
Moderator

Joined: Wed Dec 01, 2010 1:12 pm
Posts: 299
Post Re: Nav Bar / Left Bar
You're likely getting this error because you are trying to put that script into a property binding as opposed to an event script. If you right click on the tab strip and the click on configure actions you can then add your script to the property change section.

You're going to want to filter on event.propertyName =='string' instead of propertyChange I believe.

_________________
Dave Fogle
Technical Support
Inductive Automation


Thu Mar 17, 2011 12:43 pm
Profile
Moderator
Moderator

Joined: Wed Apr 18, 2007 11:00 am
Posts: 645
Location: Sacramento Ca.
Post Re: Nav Bar / Left Bar
Your script should look like:
Code:
if event.propertyName == "selectedTab":
   system.nav.swapWindow(event, event.newValue)

_________________
Robert McKenzie
Inductive Automation
Technical Support


Thu Mar 17, 2011 1:28 pm
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: