Board index » delphi » ListBox delete items

ListBox delete items

I am trying to delete an item from a listview.  When I issue the following
:-

Listbox1.Items.Delete(iIndex);

I get a compile message "not enough actual parameters".  I cant see how I
can be doing anything wrong.

help appreciated.

james.

 

Re:ListBox delete items


Typo in previous message......

I am trying to delete an item from a LISTBOX (not listview as previously
stated).  When I issue the following :-

Listbox1.Items.Delete(iIndex);

I get a compile message "not enough actual parameters".  I cant see how I
can be doing anything wrong.

help appreciated.

james.

Re:ListBox delete items


Quote
> I am trying to delete an item from a listview.  When I issue the following
> :-

> Listbox1.Items.Delete(iIndex);

> I get a compile message "not enough actual parameters".  I cant see how I
> can be doing anything wrong.

You would only get this error message if iIndex were a function with
parameters.

-Mike

Re:ListBox delete items


i know, thats what is weird.

iIndex is simply an integer.  I have tried replacing with a constant (as a
test) and same thing occurs.

any more help?

Quote
Mike Williams <m...@remove.aps-soft.com> wrote in message

news:7o7jji$n4p1@forums.borland.com...
Quote
> > I am trying to delete an item from a listview.  When I issue the
following
> > :-

> > Listbox1.Items.Delete(iIndex);

> > I get a compile message "not enough actual parameters".  I cant see how
I
> > can be doing anything wrong.

> You would only get this error message if iIndex were a function with
> parameters.

> -Mike

Re:ListBox delete items


Problem solved.  After 3 hours of looking a flash of inspiration.  I was
stupidly using [ ]  around my index integer instead of ( ).  --- even though
I used the correct ones in my example here ---

Thanks mike for help anyway.  I must be getting tired here in the UK.

Quote
James <james> wrote in message news:7o7k18$mn519@forums.borland.com...
> i know, thats what is weird.

> iIndex is simply an integer.  I have tried replacing with a constant (as a
> test) and same thing occurs.

> any more help?

> Mike Williams <m...@remove.aps-soft.com> wrote in message
> news:7o7jji$n4p1@forums.borland.com...
> > > I am trying to delete an item from a listview.  When I issue the
> following
> > > :-

> > > Listbox1.Items.Delete(iIndex);

> > > I get a compile message "not enough actual parameters".  I cant see
how
> I
> > > can be doing anything wrong.

> > You would only get this error message if iIndex were a function with
> > parameters.

> > -Mike

Other Threads