Can't hide child panels?
-
Is this intentional?
const var Panel1 = Content.getComponent("Panel1"); for (x in Panel1.getChildPanelList()) x.removeFromParent(); const cp = Panel1.addChildPanel(); cp.showControl(false);
-
KSP style workaround
cp.set("x", -1000);
-
@d-healey Give it a paint routine and it'll work.
Please do me a favour, don't ask why...const var Panel1 = Content.getComponent("Panel1"); for (x in Panel1.getChildPanelList()) x.removeFromParent(); const cp = Panel1.addChildPanel(); cp.showControl(false); cp.setPaintRoutine(function(g) { g.fillAll(Colours.antiquewhite); });
-
@ustk Strange, in my real project they have a paint routine and it still doesn't work. I wonder if it's because my child panels have child panels (also with paint routines).
-
@d-healey Here's a nested child situation, it still works:
HiseSnippet 1019.3ocsV8taiSDDecR8wEC2INo6yHq9IGoPjs45ARmNQullBQz+XQNJvmNs0dS7pZuaX851FPmDhm.dD3ogmCdD3M.l0qcrycgzVKgU+ilcley7amc1Y1.AOjjkwEHidud4BBx3iLmtjIiGEioLzjCQFO17DbljHr0KcvxE3rLRDxvn6WoVvn2Nnhu+9KO.mfYgj5kPny4zPxwzTprd0f8+FZRxQ3HxqooMr9Y6OIjyFwS34.e5Z5hVfCuDOmbJVYVGSjwCFGQkbwTIVRxPF6b.OZ4zX90Ls8mSynWjPTBdnofizKeDOIRwX0pnQwzjnfp8cFB7RPcVnqNK7TySnQzUqWmM93BE10HZlOL5rN85tF879un2FnjQCJsilROwbZnftPVqQwmOzbBCNblggzdSpnsE04O6ZNhCVvjCSwWRNR.BqP37bW2A1ve5+BKKH0mIsuBKrCvLRhm8KsqPNmHGwSWvYffytZ06pvLiKrctwlxJwTXYwlQIdLMS5zuuUuaFJHo7qTQOM.KTdQgtLjIjq.nEvfXV5HbTTsiTV2vV+Jaaf78AX0TaFQFvynRJm43AaZ0u95+Cl1vqqYo+dCfe71ycvdtaxiPQg7a44RJi3LKmEV.Zdeqewp27gyfZ7Wkj3nqmyFhYR5OkStNlJIfyd6JG52RGJHQU9A9nrD.kcEJaN6fbojy7TGhBdhSX0I3.3PNImT3001QPgZkwZK.u+BqMWDT57c6q3cIpQ3jjKfarNuaruEJ5e6Tzu0Tze6TzeMJ1fZmxkjyXNETv5sV1uqpYy1ntR2kPDaTspgmXa.cX4oWPDMS.JCgt.q2Z4A2sVKg5LSCC4rILp7rEjR4s2aDUlZgVRcJYHXprngziKaHoSjHJ3jdlkG7nB52b1.5d.2eCv+tIGhkXUqwRJAzbAQHoprgwgjqf4L5Fk8LOjjcoju.B0pxAHioC6ipZip5STD0GZp64ftoNf+39KaJbMMRFiLLM9cCDJlPmGKURCLJxPqBwGbGRL0A4WwMBxe8y0A42PMCxm.RRxMRkeOd74iO11yd5We12eOireiH+GxVFY+xH+9Smf4h7n7Drb8gkpWHTp.JyWaBkZJDCZztr4w78XBp6VmfdWo3SLCnxv3MywNafipaB+Ovwx2c7HywylQBk0DbGyi9g19HiaI75IMyOAKETn3v7z7zovjkPBDcFbiHSUDzQUhqkcUxpLvTBKpP3efuRkdJYiRkdUJQo3PA+Mg569pW17vhU.NwJdTWO30kfr8pNFlltCcQovirdSXnZ6+oPeoMiwuEX9rVf4Ys.yds.yyaAlOuEX9hshQ891WkK4o5qCvBAiKZ8ZXLlggJqhpPz+tGStkB
-
@ustk Interesting, I shall play around some more, thanks!
-
Aha yes it's working. I had to move the order of some calls around.