-
Why onClick doesnt work in UI Panel ????
I dont know why variables in UI Panels doesnt work, just with the normal Window work, but not in the panel. I dont know how to assign variable name to an specific panel statement.
{
function myScript(thisObj){
function myScript_buildUI(thisObj){
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette","My Window name",undefined,{resizable:true});res = "group{orientation:'column',\
groupTwo: Group{orientation:'column',\
myIconButton: IconButton{text:'IconButton', image:'~/Desktop/LogoC5Ctrl.png'},\
myStaticText: StaticText{text:'Este es mi texto /n dfgdf'},\
},\
groupOne: Panel{text:'Master', orientation:'column',alignment:['fill','fill'],alignChildren:['fill','fill'],\
myCheckbox: Checkbox{text:'My Checkbox'},\
myDropDownList: DropDownList{properties:{items:['Amarillo','Morado','LightBlue','MidBlue']}},\
},\
}";myPanel.grp = myPanel.add(res);
//Defaults
myPanel.grp.groupOne.myDropDownList.selection = 0return myPanel;
var BtnURL = myPanel.grp.groupTwo.myIconButton.onClick
//Action to link Voraz OnClick
BtnURL.onClick = LinkToURL;function LinkToURL()
{
var URL = "https://www.estudiovoraz.com"; // your web page
if ($.os.indexOf("Windows") != -1)
system.callSystem(winBrowserCmd + " " + URL);
else
system.callSystem(macBrowserCmdStart + URL + macBrowserCmdEnd);}
}
var myScriptPal = myScript_buildUI(thisObj);if((myScriptPal != null) && (myScriptPal instanceof Window)){
myScriptPal.center();
myScriptPal.show();
}}
myScript(this);
}
Sorry, there were no replies found.