357mag 2 Posted April 12, 2023 (edited) I need to print these lines on separate lines. So each output is on a new line. Don't know where I'm going wrong but right now it's doing this: The value of count is 0The value of total is 5 My code is this: int count; int total; count = 5; total = 0; EditResults -> Text = EditResults -> Text + "The value of count is " + IntToStr(count) + "\r\n"; EditResults -> Text = EditResults -> Text + "The value of total is " + IntToStr(total); // total = ++count + 6; // EditResults -> Text = EditResults -> Text + "\r\nThe value of count is " + count; // EditResults -> Text = EditResults -> Text + "\r\nThe value of total is " + total; I've commented out the last three lines until I figure out what's wrong. I'm using an Edit box and I looked for a multi-line property but none is listed. Edited April 12, 2023 by 357mag Share this post Link to post
357mag 2 Posted April 12, 2023 So I got rid of the Edit box and replaced it with a Memo box and now my program is printing on different lines. But it also says MemoResults in the box, so how do I get rid of that? I'm looking in Properties for a Text or Caption property and I don't see them. Share this post Link to post
Lars Fosdal 1793 Posted April 12, 2023 Is there an EditResults -> Lines -> Add method? Share this post Link to post
357mag 2 Posted April 12, 2023 My program runs correctly now, but for some odd reason when I hit Run in the Memo box the words (what I used to name the Memo control) say "MemoResults". How do I get rid of those words? I don't want those words in there. Share this post Link to post
Lars Fosdal 1793 Posted April 12, 2023 Add MemoResults -> Clear() at the beginning of your code. I recommend looking up the online help for the VCL components to learn about their capabilities. Share this post Link to post
357mag 2 Posted April 12, 2023 Ha! I got it figured out! You have to go into Lines and then delete those words in the String List Editor. Works good now. Share this post Link to post