Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

2 Listboxes

Posted on 2010-09-12
4
Medium Priority
?
232 Views
Last Modified: 2012-08-13
Hi all,

Should be an easy question. I have 2 listboxes on my form. What I am trying to do is the following. I am reading data from my serial port and adding it to listbox1 but I need to "pause" it some times so I have an invisible listbox2 also to which the data is then directed when in "paused" state. So how do I append all the data from listbox2 into listbox when "unpaused"?
0
Comment
Question by:DigitalNam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Mechanic_Kharkov earned 2000 total points
ID: 33657103
Listbox1.Items.BeginUpdate;
Listbox1.Items.AddStrings(ListBox2.Items);
ListBox1.Items.EndUpdate;

;-)
0
 
LVL 1

Author Closing Comment

by:DigitalNam
ID: 33657143
Hehehe thanks Mechanic Kharkov... works like a charm. Thanks for the quick response.
0
 
LVL 5

Expert Comment

by:Mechanic_Kharkov
ID: 33657166
Not at all. And one more thing: You don't need to use hidden listbox, just use TStringList to collect lines. E.g.:

var ReservedList: TStringList;

begin
 ReservedList := TStringList.Create();
try
   ... //use it
finally
  ReservedList.Free;
end;
end;

This list is the same as TListbox.Items. You can Clear it, Add, AddStrings, and so on. But it has no visual representation on your form. You can create it in FormCreate method and free in FormClose as well.
0
 
LVL 1

Author Comment

by:DigitalNam
ID: 33657188
Thank you for the suggestion.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question