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!

Very Simple Memo Help

Status
Not open for further replies.

gnosis13

Programmer
Jul 13, 2001
263
US
Please forgive my stupidity...I am new at Builder5. I have a memo box loaded from a text file. I would like to loop through each line one at a time putting the line in an edit box each iteration until the last line in the memo. I will later use the edit box to do some testing etc but for now, I just need to loop through the memo.

This should be a simple DO...Until EOF loop but totally eludes me (too much Visual Basic!)

Help?
A+, N+, MCP
 
The help file indicates that this might work:
Code:
Memo1->SelectAll();  // Selects all text in memo box
Memo1->CutToClipboard(); // Sends all text to clipboard
Edit1->Clear(); // Clears everything in edit box
Edit1->PasteFromClipboard(); // Copies all from clipboard
Memo1->SetFocus(); // Sets focus back to memo box
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Actually, what I need is each individual line, one at a time. Kind of like reading through an INI file.

ex:
for (x = 1, x < EOF, x++)
{
edtTemp->Text = memDisplayWindow->Lines->Strings[x];
}

The problem is that I don't know how to find EOF of a memo.
A+, N+, MCP
 
I haven't tried this but something like this should work.
Code:
for (int j=0, j<MemoBox->Count, j++)
{
    EditBox1->Add(MemoBox1->Strings[j]);
}
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Thanks, I actually got it worked out.....I read help files until my nose bled. A+, N+, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top