Re: show/hide objects when a menu option is selected
Posted: 22 Nov 2014 04:39
You shouldn't need the initial if statement.
show(Container0, selection==0); The selection==0 part works as a condition in itself. So if selection does not equal 0, then Container0 will hide.
Try just doing:
show(Container0, selection==0);
show(Container1, selection==1);
show(Container2, selection==2);
show(Container3, selection==3);
show(Container4, selection==4);
show(Container5, selection==5);
show(Container6, selection==6);
show(Container7, selection==7);
show(Container0, selection==0); The selection==0 part works as a condition in itself. So if selection does not equal 0, then Container0 will hide.
Try just doing:
show(Container0, selection==0);
show(Container1, selection==1);
show(Container2, selection==2);
show(Container3, selection==3);
show(Container4, selection==4);
show(Container5, selection==5);
show(Container6, selection==6);
show(Container7, selection==7);