View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003051||JEDI VCL||00 JVCL Components||public||2005-06-23 06:07||2005-08-09 08:45|
|Target Version||Fixed in Version||3.10|
|Summary||0003051: Index out of bound on clicking on embty list box|
|Description||For any jvCustomListBox descendant, when setting DragMode to dmAutomatic and clicking on the list while embty, it produces the error "List out of bound List(0)".|
I've traced the error and found that the cause of the problem that when embty, ListIndex still hold 0, while it should hold -1.
My fast solution is to change the DefaultStartDrag of TjvCustomListBox to be as following:
procedure TJvCustomListBox.DefaultStartDrag(var DragObject: TDragObject);
If Items.Count = 0 Then //Ahmed Fouad 23/06/05 3:15:38 PM Solve problem with embty list
ItemIndex := -1;
FDragIndex := ItemIndex;
if not IsProviderSelected and (FDragIndex >= 0) then
|Tags||No tags attached.|
JvListBox.pas (64,094 bytes)
I've just dropped a TJvListBox on an empty form, and I could not reproduce this problem.
Please create a sample application, zip up the sources, and attach it to the issue.
Sorry about that,
i forgot one detail, set MultiSelect to True
the scenario is , drop any jvListBox on a form, set DragMode to dmAutomatic and set MultiSelect to True.
run and just click on it, it will produce the error
Nope, not even with this.
I'm using Delphi 6 here, which version do you use?
TestJVClListBox.zzz (274,017 bytes)
The problem produces on Delphi 7, i've tested it on Delphi 5 and it doesn't show.
i've sent a file with the source and the executable, just rename the extension to .zip
Well, I've just tested with the Delphi 7 here, yes, ItemIndex is 0, but that's windows returning this, not us (see TCustomListBox.GetItemIndex)
Anyway, I just compiled your application, I don't have a single problem with the application. Sure, the exe you provided does display the problem, but I suspect an issue with your setup, something specific to your operating system and/or version of Delphi. Have you applied all the patches?
||Well, no answers in more than a month, this is considered fixed.|
|2005-06-23 06:07||laplace||New Issue|
|2005-06-23 06:07||laplace||File Added: JvListBox.pas|
|2005-06-23 11:08||obones||Note Added: 0007484|
|2005-06-23 11:08||obones||Status||new => feedback|
|2005-06-23 11:20||laplace||Note Added: 0007485|
|2005-06-23 12:29||obones||Note Added: 0007486|
|2005-06-26 02:19||anonymous||File Added: TestJVClListBox.zzz|
|2005-06-26 02:21||anonymous||Note Added: 0007491|
|2005-06-27 00:36||obones||Note Added: 0007496|
|2005-08-09 08:45||obones||Status||feedback => resolved|
|2005-08-09 08:45||obones||Resolution||open => fixed|
|2005-08-09 08:45||obones||Assigned To||=> obones|
|2005-08-09 08:45||obones||Note Added: 0007748|