?
Solved

Very difficult for me ( listbox.delete )

Posted on 1998-12-12
2
Medium Priority
?
154 Views
Last Modified: 2010-04-04
Hi..
I´m adding items to listbox with checkbox, when i click my checkbox1 then i add his caption to listbox and so on upp to checkbox10.caption. And now when i click any of my checkbox to checked = False then i will delete the line for the checkbox.caption text in listbox ( Thanks......)
0
Comment
Question by:emmi
[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 Comments
 
LVL 4

Accepted Solution

by:
dwwang earned 320 total points
ID: 1350772
IndexToDelete:Integer;
CheckBoxNCaption:string;

You can set the CheckBoxNCaption value to a checkbox's caption on its OnClick event, then

IndexToDelete:=MyListBox.Items.IndexOf(CheckBoxNCaption);
MyListBox.Items.Delete(IndexToDelete);

Regards,
Wang
0
 

Author Comment

by:emmi
ID: 1350773
Thanks..... this was a excelent answer.....
0

Featured Post

Independent Software Vendors: 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

771 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