Home > Back-end >  Now write a gift with a little, how to write simple efficient?
Now write a gift with a little, how to write simple efficient?

Time:10-07

Now write a gift with a little, my way is to check the label control, and then to a variable to add 1, but think it is too uncomfortable, I need to set up dozens of variables that can get into a template, every point a control calls this template?

CodePudding user response:

Not understand quite right,
Can't read the multiple IABLE for one group, called the same event, an array variable, to judge which one click IABLE increases the value of the corresponding subscript array,

CodePudding user response:

All the lable click bindings to the same click method, the sender is the lable, click StrToInt (TLable (sender). Caption) + 1

CodePudding user response:

Call the same OnClick time, Tlable (Sender). Caption:=IntToStr (StrToInt (Tlable (Sender). Caption) + 1)
  • Related