Hi,
I have a following problem. When I double click on an item in a ListBox, this item is moved to another ListBox - (but this is not important here). The problem is - when I doubleclick on a ListBox when NO ITEM is selected (I click ona an empty space) an error occurs. I tried to avoid this by checking in the ListBoxDoubleClick procedure:
if (ListBox->ItemIndex!=-1) [move item] but it's strange - EVEN when an item IS selected, when I debug the program it says that ItemIndex is -1. I don;t know what causes the problem... Can somebody help?
Thanks,
Baal.
I have a following problem. When I double click on an item in a ListBox, this item is moved to another ListBox - (but this is not important here). The problem is - when I doubleclick on a ListBox when NO ITEM is selected (I click ona an empty space) an error occurs. I tried to avoid this by checking in the ListBoxDoubleClick procedure:
if (ListBox->ItemIndex!=-1) [move item] but it's strange - EVEN when an item IS selected, when I debug the program it says that ItemIndex is -1. I don;t know what causes the problem... Can somebody help?
Thanks,
Baal.