Delete a text box and a button from a lineup boxI'm trying to delete both the button itself and the associated text box before it. So when I cilck button nr 3 I want text nr 3 to also be deleted. Any ideas?
nr=5;
new window("Button test",
Lineuplist=Lineup Box( N Col( 2 ),
)
);
For(i=1,i<=nr,i++,
Lineuplist << append(textbox("Text nr "||char(i)));
Lineuplist << append(
buttonbox("Button nr "||char(i),
<< Set Function(
Function({this},
this << delete;
)
)
);
);
);Re: Delete a text box and a button from a lineup boxThanks!
Re: Delete a text box and a button from a lineup boxHere is a piece of code that works:
nr=5;
new window("Button test",
Lineuplist=Lineup Box( N Col( 2 ),
)
);
For(i=1,i<=nr,i++,
Lineuplist << append(textbox("Text nr "||char(i)));
Lineuplist << append(
buttonbox("Button nr "||char(i),
<< Set Function(
Function({this},
ps=this<<SIB></SIB>Re: Delete a text box and a button from a lineup box@pauldeen
nr=5;
new window("Button test",
Lineuplist=Lineup Box( N Col( 2 ))
);
);
For(i=1,i<=nr,i++,
Lineuplist << append(textbox("Text nr "||char(i)));
Lineuplist << append(
buttonbox("Button nr "||char(i),
<< Set Function(
Function({this},
this << delete;
)
)
);
);
Lineuplist[Text Box(i)] << delete ; // this is the piece of code which will do what you are after . Insert it where you delete the button
);