Help with tabs in the scriptUI
Hello friends!
Normally when we open a dialog box that contains some open, it is normal that when we select one of these tabs, show its respective interface content.
My question would be:
Is there any possibility to execute a second function when I select a tab and show its contents:
Example:
A dialog box has 3 tabs "Color", "Levels" and "Curves"
If I select the "Levels" tab also perform something like that, it may be an Alert warning: "You have selected the Levels tab".
var dlg = new Window ("dialog", "Abas", [0,0,0,0]);
dlg.size = [240, 120]
dlg.location = [415, 230]
var tpanel = dlg.add ("tabbedpanel" ,[10,10,0,0],);
tpanel.size = [220,100];
dlg.location = [10, 10];
var general = tpanel.add ("tab", [0,0,0,0], "Color");
var images = tpanel.add ("tab", undefined, "Levels");
var img_options = images.add ("panel", undefined, "Image Options");
var buttons = dlg.add ("group");
buttons.add ("button", undefined, "Export", {name: "ok"});
buttons.add ("button", undefined, "Cancel");
var images1 = tpanel.add ("tab", undefined, "Curves");
var img_options = images1.add ("panel", undefined, "Image Options");
var buttons = dlg.add ("group");
buttons.add ("button", undefined, "Export", {name: "ok"});
buttons.add ("button", undefined, "Cancel");
tpanel.selection = 0;
dlg.center();
dlg.show ();
