BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delete Item from ListBox

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Y. Geoy
Guest





PostPosted: Wed Nov 26, 2003 5:59 pm    Post subject: Delete Item from ListBox Reply with quote



Hello, I hate to ask questions like that because I'm sure there is a very
very easy answer but, after builder docs, newsgroup and google, couldn't
find the answer, Here it is:
How can I delete an Item from a ListBox? I would have thought that Selecting
the Items and hitting the Del key would have worked, but no. Do I have to
write code with the OnKeyPress and find out if it is the Del key and do
ListBox->Items->Delete?

Ygeoy


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Nov 26, 2003 6:18 pm    Post subject: Re: Delete Item from ListBox Reply with quote




"Y. Geoy" <ygeoy (AT) hotmail (DOT) com> wrote


Quote:
How can I delete an Item from a ListBox?

The Items property is a TStrings instance. The TStrings class has a
Delete() method which takes an Index parameter specifying the item to delete
from the list.

Quote:
I would have thought that Selecting the Items and hitting the Del
key would have worked, but no.

No, it is not designed for that. If you want that kind of functionality,
you have to code it yourself.

Quote:
Do I have to write code with the OnKeyPress and find out if
it is the Del key and do ListBox->Items->Delete?

Yes.


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.