The task is to put text in ab Edit box & then to iterate over it. The result should be in a block graph. If there is a vowel =="A" then block one should rise, if =="B" then block two should rise to represent it.
I can make this work for the first letter in the edit box with the following code:
/* {
int Index;
Index=1;
for(Index=1;Index<=5;Index++)
{
if(Edit1->Text=="A")
{
Shape1->Height= (Shape1->Height+5);
Shape1->Top = Shape1->Top -5;
}
if(Edit1->Text=="E")
{
Shape2->Height= (Shape2->Height+5);
Shape2->Top = Shape2->Top -5;
}
if(Edit1->Text=="I")
{
Shape3->Height= (Shape3->Height+5);
Shape3->Top = Shape3->Top -5;
}
if(Edit1->Text=="O")
{
Shape4->Height= (Shape4->Height+5);
Shape4->Top = Shape4->Top -5;
}
if(Edit1->Text=="U")
{
Shape5->Height= (Shape5->Height+5);
Shape5->Top = Shape5->Top -5;
}
}*/
BUT this only works when the letter is at Index=1. I need to scan a sentence so that the result of the graph shows how many A's how many E's how many I's how many O's how many U's.
How do I get it to read over the text & not just the first letter?