Does a siBool(check box) have an onChanged or onClicked event? I'm trying to enable/disable a ui control with a check box. I have it working with a button using onClicked, but I can't seem to get the check box to register with either event. What am I missing?
var oPSet = ActiveSceneRoot.AddProperty( "CustomProperty", false, "ButtonExample" ) ;
oPSet.AddParameter3( "Checker", siBool, 1 ) ;
oPSet.AddParameter3( "Switcher", siBool, 1 ) ;
var oLayout = oPSet.PPGLayout
oLayout.AddButton( "Clicker" ) ;
oLayout.AddItem("Switcher");
oLayout.AddItem("Checker");
oLayout.Logic = Switcher_OnClicked.toString() ;
oLayout.Logic = Clicker_OnClicked.toString() ;
oLayout.Language = "JScript" ;
InspectObj( oPSet ) ;
function Clicker_OnClicked()
{
LogMessage("clicked button");
LogMessage("Checker is:" + PPG.Checker.ReadOnly);
if(PPG.Checker.ReadOnly){
PPG.Checker.ReadOnly = false;
}else{
PPG.Checker.ReadOnly = true;
}
PPG.refresh();
}
function Switcher_OnClicked()
{
LogMessage("clicked Switcher");
if(PPG.Checker.ReadOnly){
PPG.Checker.ReadOnly = false;
}else{
PPG.Checker.ReadOnly = true;
}
PPG.refresh();
}
--
Byron Nash