Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleting a checkbox with a specific tag?

Status
Not open for further replies.

cynikern

Programmer
Mar 22, 2003
3
US
i have created a couple of checkboxes in runtime with diffrent tags, and now i want to delete everyone that i have checked with the help of their unik tags. how can i accomplish that?

thanks in advance
//cynikern
 
TCheckbox *checkbox1;
TCheckbox *checkbox2;
TCheckbox *checkbox3;
TCheckbox *checkbox4;

checkbox1 = new TCheckbox; and so,on.

if (checkbox1->Tag)
delete checkbox1; and so on

do it in a loop
do it in a switch

make an array of checkbox pointers.

if you are trying to get the selected checkbox after they are created and when they have been checked look at the previous thread about deleting a timage. see dynamic cast.

kinda depends who what and when.

tomcruz.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top