delphi - how to use a counter when refering to a specific edit box -
this question has reply here:
how access variable name(string)? 3 answershere's i'm trying do,
for y:=1 8 begin if edittexty.text = '1' input1[y]:=true else input1[y]:=false;
the problem is, delphi recognizes edity.text whole variable
all want compare 8 editboxes 1's , set array value true/false. i'm trying loop whole process in order avoid writing out edit1.text, edit2.text etc. ideas ?
thanks help.
var lcomponent : tcomponent; begin y:=1 8 begin lcomponent := self.findcomponent('edit' + inttostr(y)); if (not assigned(lcomponent)) or (not (lcomponent tcustomedit)) continue; input1[y] := (lcomponent tcustomedit).text = '1'; end; end;
where self
form holds edits.
delphi
No comments:
Post a Comment