Jump to content

CastorGUI Radio button not calling callback


shedbuilder
 Share

Recommended Posts

I am using the castor gui radio buttons to pick color choices by placing the radio buttons over a panel background of the color choice.  

 

Picking the radio button does not seem to fire the callback shown in bold below:

 

 
for (var i = 0; i <= 16; i++)
{
ShedColorPanel = new CASTORGUI.GUIPanel(  "colorpanel"+i ,{ x:currentx, y:50, w:50, h:50, backgroundColor:"#"+ShedColorValues}, guisystem  );
ShedColorRadio = new CASTORGUI.GUIRadio(  "siding"+i,{ x:currentx+20, y:70,   name:"siding"}, guisystem , ShowColorPage);
        ShedColorRadio.setVisible(false);
currentx += 60;
}
 
I put the same callback routine on a normal button and it did work there.
 
 
Thanks
Jeff
Link to comment
Share on other sites

Hello,

 

Can I see your ShowColorPage function ?

 

You must do this:

var ShowColorPage = function() {

    // your code

};

 

When I tested on a demo, it works :

var radio = new CASTORGUI.GUIRadio("siding", { x:20, y:70, name:"siding"}, guisystem, function() { alert("Ok"); });

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...