View Full Version : turning push button component on and off
Billy T
06-02-2003, 03:03 AM
Anyone else had trouble with this? My push buttons just decide to turn themselves on for no reason that I can see...
freddycodes
06-05-2003, 12:27 AM
I could not recreate the problem. I placed two push buttons on the stage. btn1 and btn2. And used this as
btn2.setEnabled(false);
btn1.setClickHandler("toggleButton");
function toggleButton() {
if(btn2.getEnabled() == false) {
btn2.setEnabled(true);
btn1.setLabel("Disable Push Button");
}
else {
btn2.setEnabled(false);
btn1.setLabel("Enable Push Button");
}
}
Billy T
06-05-2003, 12:47 AM
yeah the problem was occuring for me when I was running big functions that were loading external text and stuff. Running the function would turn the buttons on even though I had setEnabled set to false
what I ended up doing was moving the setEnabled line so it happened after the text had loaded and this fixed the prob
Thanks anyway
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.