shedbuilder Posted December 14, 2015 Share Posted December 14, 2015 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. ThanksJeff Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 14, 2015 Share Posted December 14, 2015 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"); }); Quote Link to comment Share on other sites More sharing options...
shedbuilder Posted December 14, 2015 Author Share Posted December 14, 2015 You were right. I had another error and was calling the wrong function. I found the problem after reader your post above. It is now working instantly when the radio button is selected. http://www.berezintechnologies.com/shed/ Sorry for taking your time. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 15, 2015 Share Posted December 15, 2015 No problem shedbuilder . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.