Hide objects named on list

Rumburak shared this question 2 years ago
Answered

I want to read every item in the list incrementally for hide few object. I put my code below but not work :


list1={"A","B","C","faceVAB"}


var a=4


for (var i=1; i<a; i++) {

var templist=ggbApplet.getValueString(list1(i));

ggbApplet.setVisible(templist,false);

}


Can you give me an idea?

Comments (2)

photo
2

create a GG object ie:name=""

then a line of code with ggbApplet.evalCommand("setValue(name,element(list1,"+i+")")

then templist from name

excuse my english

photo
1

Thank you mathmagic ! Work well with :


ggbApplet.evalCommand("SetValue[objHide,Element(list1,"+i+")]");

© 2019 International GeoGebra Institute