 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Y. Geoy Guest
|
Posted: Wed Nov 26, 2003 5:59 pm Post subject: Delete Item from ListBox |
|
|
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
|
Posted: Wed Nov 26, 2003 6:18 pm Post subject: Re: Delete Item from ListBox |
|
|
"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 |
|
 |
|
|
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
|
|