Board index » delphi » Variables and Strings

Variables and Strings

I am sure Ive resolved this one a generation ago but now the blinds are
drawn.
I have a series of editboxes and want to refer to the data in them in a loop
at run time, thus:

s:= ((editbox11)+ '.text')

But I dont want the string s to contain editbox11.text but the data in
editbox11.text.
I am sure I ve done this before but the minds a blank. Anybody else know the
feeling?

 

Re:Variables and Strings


hi

Quote

> s:= ((editbox11)+ '.text')

wouldn't this be s:= (editbox11 as TEdit).text?

Quote
> I am sure I ve done this before but the minds a blank. Anybody else know
the
> feeling?

YES! especially after drinking a few beers ;)

Re:Variables and Strings


Quote
"JackJ" <j...@wave.co.nz> wrote in message

news:95s9dl$icd$1@news.wave.co.nz...

Quote
> I am sure Ive resolved this one a generation ago but now the blinds are
> drawn.
> I have a series of editboxes and want to refer to the data in them in a
loop
> at run time, thus:

> s:= ((editbox11)+ '.text')

> But I dont want the string s to contain editbox11.text but the data in
> editbox11.text.
> I am sure I ve done this before but the minds a blank. Anybody else know
the
> feeling?

s := (aForm.FindComponent ('Edit' + IntToStr (i)) as tEdit).Text;

Other Threads