FORUMS: list search recent posts

After Effects Scripting: Action on Tab Change

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Sevigny
After Effects Scripting: Action on Tab Change
on Mar 26, 2016 at 2:52:20 pm

I'm wondering if there's a way to update certain values in my (floating) GUI when the user changes from one Tab to the other.

I've tried variations of the following:
myTab.onClick = function()

Thanks in advance!
Mike Sevigny


Return to posts index

Mike Sevigny
Re: After Effects Scripting: Action on Tab Change
on May 12, 2016 at 2:12:44 pm

Solved.
The following works:
// Create the tabbed panel & 3 Tabs
var scriptWindow = new Window("palette", "SCRIPT_NAME"); {
var tabPanel = scriptWindow.add("tabbedpanel", undefined, "")
var Tab1 = tabPanel.add("tab", undefined, "TAB_1")
var Tab2 = tabPanel.add("tab", undefined, "TAB_2")
var Tab3 = tabPanel.add("tab", undefined, "TAB_3")
}
scriptWindow.show();

// Do something when the Tab is changed to 'Tab1'
tabPanel.onChange = function() {
if (String(tabPanel.selection) == "Tab1") { // If 'Tab1' is selected
// do something
}
}


Cheers,
Mike Sevigny


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]