dev.emsdn.com

Join About
Home SITEMAP Most Recent

Delphi

Home »» Delphi [Programming]
Thread Profile: Multi select not working as expected in TFileList.


Multi select not working as expected in TFileList.

At 10:33 AM 6/13/2007, CubicDesign wrote:
>I want to drag and drop multiple files from a TFileList into a TListBox.
>I set ExtendedSelect and MultiSelect to True, then I select several
>files (with contol+click or shift+click) then a click a random file in
>order to start the dragging process. But at this moment all files are
>deselected (except the last clicked one).
>
>More exactly, clicking the TFileList without having the Shift or Control
>key pressed will cause to loose the selection.
>This bug hunt's me for a long time but now I really want to drag and
>drop multiple files.
>
>There is a way to fix the problem or I should consider using a 3rd party
>control to replace TFileList.

I use many applications that work this way, therefore I don't consider it
buggy behavior. You do need to mouse-down on the final selected item and
then immediately start the drag operation. Isn't this standard behavior?
Just so I understand what you are asking for, how do you think initiating a
drag/drop after multi-selects should work?
Delphi mailing list -Delphi (AT) elists (DOT) org


total 8 Comments Similar Thread
  • 8Answer
  • Total

at [2008-5-6 18:40:46]


Doug Chamberlin wrote:
At 10:33 AM 6/13/2007, CubicDesign wrote:
>I want to drag and drop multiple files from a TFileList into a TListBox.
>I set ExtendedSelect and MultiSelect to True, then I select several
>files (with contol+click or shift+click) then a click a random file in
>order to start the dragging process. But at this moment all files are
>deselected (except the last clicked one).
>>

>More exactly, clicking the TFileList without having the Shift or Control
>key pressed will cause to loose the selection.
>This bug hunt's me for a long time but now I really want to drag and
>drop multiple files.
>>

>There is a way to fix the problem or I should consider using a 3rd party
>control to replace TFileList.


I use many applications that work this way,

Anything we've heard of?

therefore I don't consider it
buggy behavior. You do need to mouse-down on the final selected item and
then immediately start the drag operation. Isn't this standard behavior?

No, it's not standard. Try it with Explorer.

The selection should only get cleared on a click event. A click doesn't
occur until the mouse button has been pressed *and* released without the
cursor moving outside a specified area. If the cursor moves too far,
then the operation is a drag, not a click.

Just so I understand what you are asking for, how do you think initiating a
drag/drop after multi-selects should work?

The selection and the dragging are allowed to be two separate
operations. , it requires too much planning from the user on
the last selection operation. The user would need to know what the last
selection will be so that he or she can begin dragging. , the
user would need to unselect something just so that selecting it can
begin a drag operation.


  • 1No.

at [2008-5-6 18:41:46]


Doug Chamberlin wrote:
You do need to mouse-down on the final selected item and
then immediately start the drag operation. Isn't this standard behavior?

I didn't used Windows Explorer in the last 10 years so I went straight
in Explorer and
1. I selected some files (shift click)
2. Then I released the click
3. I clicked again on the selection (in order to start the drag
operation) and the selection was not lost, like it is lost in TFileList.

So I don't think that TFileList has a 'standard' behavior.
Maybe I don't use Explorer, but I know that many (majority) users do.

This bug appears on the 'fixed bugs list' in Delphi 4. It looks like
somewhere on the road, between D4 and D7 it was reintroduced.

Delphi mailing list -Delphi (AT) elists (DOT) org


  • 2No.

at [2008-5-6 18:42:50]


At 10:03 PM 6/17/2007, Rob Kennedy wrote:
>The selection and the dragging are allowed to be two separate
>operations. , it requires too much planning from the user on
>the last selection operation. The user would need to know what the last
>selection will be so that he or she can begin dragging. , the
>user would need to unselect something just so that selecting it can


Hmmm I thought that's what I was describing. I must have misunderstood
the original description of the problem.

Delphi mailing list -Delphi (AT) elists (DOT) org


  • 3No.

at [2008-5-6 18:43:44]


That's not what I experience in Windows Explorer. I can click a file;
release mouse button; shift+click another file to select multiple files;
release mouse button. Now click and hold the mouse button down on a
selected file and it starts dragging all the files.

This is how it's always worked since Win95 at least.

Ross.

Message
From: delphi-bounces (AT) elists (DOT) org [mailto:delphi-bounces (AT) elists (DOT) org] Behalf
CubicDesign
Sent: Monday, 18 June 2007 20:41
To: Borland's Delphi Discussion List
Subject: Re: Multi select not working as expected in TFileList.

Doug Chamberlin wrote:
You do need to mouse-down on the final selected item and
then immediately start the drag operation. Isn't this standard behavior?

I didn't used Windows Explorer in the last 10 years so I went straight
in Explorer and
1. I selected some files (shift click)
2. Then I released the click
3. I clicked again on the selection (in order to start the drag
operation) and the selection was not lost, like it is lost in TFileList.

So I don't think that TFileList has a 'standard' behavior.
Maybe I don't use Explorer, but I know that many (majority) users do.

This bug appears on the 'fixed bugs list' in Delphi 4. It looks like
somewhere on the road, between D4 and D7 it was reintroduced.

Delphi mailing list -Delphi (AT) elists (DOT) org


  • 4No.

at [2008-5-6 18:44:54]


Ross Levis wrote:
That's not what I experience in Windows Explorer. I can click a file;
release mouse button; shift+click another file to select multiple files;
release mouse button. Now click and hold the mouse button down on a
selected file and it starts dragging all the files.

Yes, this is _exactly, exactly_ what I said.

*In Explorer:*
After I made a multiple selection then I release the button, then I
click (and hold the button down) the selection again, the selection is
NT lost.

*In TFileList:*
After I made a multiple selection then I release the button, then I
click (and hold the button down) the selection again, the selection IS lost.

The question is how repair this problem without modifying the original
(Borland) files because I tried to create a new custom component based
on TFileList and the problem can't be fixed in MouseUp/MouseDown?

Somebody knows if this was fixed in Delphi 2007?

Message
From: delphi-bounces (AT) elists (DOT) org [mailto:delphi-bounces (AT) elists (DOT) org] Behalf
CubicDesign
Sent: Monday, 18 June 2007 20:41
To: Borland's Delphi Discussion List
Subject: Re: Multi select not working as expected in TFileList.
>
>
>

Doug Chamberlin wrote:

>You do need to mouse-down on the final selected item and
>then immediately start the drag operation. Isn't this standard behavior?
>>

>
>
>

I didn't used Windows Explorer in the last 10 years so I went straight
in Explorer and
1. I selected some files (shift click)
2. Then I released the click
3. I clicked again on the selection (in order to start the drag
operation) and the selection was not lost, like it is lost in TFileList.

So I don't think that TFileList has a 'standard' behavior.
Maybe I don't use Explorer, but I know that many (majority) users do.

This bug appears on the 'fixed bugs list' in Delphi 4. It looks like
somewhere on the road, between D4 and D7 it was reintroduced.

Delphi mailing list -Delphi (AT) elists (DOT) org

Delphi mailing list -Delphi (AT) elists (DOT) org


  • 5No.

at [2008-5-6 18:45:49]


I must have missed the "NT" before the lost. Sorry.

Message
From: delphi-bounces (AT) elists (DOT) org [mailto:delphi-bounces (AT) elists (DOT) org] Behalf
CubicDesign
Sent: Wednesday, 20 June 2007 22:26
To: Borland's Delphi Discussion List
Subject: Re: Multi select not working as expected in TFileList.

Ross Levis wrote:
That's not what I experience in Windows Explorer. I can click a file;
release mouse button; shift+click another file to select multiple files;
release mouse button. Now click and hold the mouse button down on a
selected file and it starts dragging all the files.

Yes, this is _exactly, exactly_ what I said.

*In Explorer:*
After I made a multiple selection then I release the button, then I
click (and hold the button down) the selection again, the selection is
NT lost.

*In TFileList:*
After I made a multiple selection then I release the button, then I
click (and hold the button down) the selection again, the selection IS lost.

The question is how repair this problem without modifying the original
(Borland) files because I tried to create a new custom component based
on TFileList and the problem can't be fixed in MouseUp/MouseDown?

Somebody knows if this was fixed in Delphi 2007?

Message
From: delphi-bounces (AT) elists (DOT) org [mailto:delphi-bounces (AT) elists (DOT) org]
Behalf
CubicDesign
Sent: Monday, 18 June 2007 20:41
To: Borland's Delphi Discussion List
Subject: Re: Multi select not working as expected in TFileList.
>
>
>

Doug Chamberlin wrote:

>You do need to mouse-down on the final selected item and
>then immediately start the drag operation. Isn't this standard behavior?
>>

>
>
>

I didn't used Windows Explorer in the last 10 years so I went straight
in Explorer and
1. I selected some files (shift click)
2. Then I released the click
3. I clicked again on the selection (in order to start the drag
operation) and the selection was not lost, like it is lost in TFileList.

So I don't think that TFileList has a 'standard' behavior.
Maybe I don't use Explorer, but I know that many (majority) users do.

This bug appears on the 'fixed bugs list' in Delphi 4. It looks like
somewhere on the road, between D4 and D7 it was reintroduced.

Delphi mailing list -Delphi (AT) elists (DOT) org

Delphi mailing list -Delphi (AT) elists (DOT) org

Delphi mailing list -Delphi (AT) elists (DOT) org


  • 6No.

at [2008-5-6 18:46:53]


Never noticed anything funny with Vista's Explorer, so I gave this a
try. Say I have a list of files, numbered from 1 to 10 (so I can make my
point).

(a) Click on file "1": It obviously got selected. Shift+Click on file
"3": files 1-3 are now selected (as expected, I employed the shift key
to multi-select)

(b) Shift-Click file "1". It got selected. Release shift key. Move to
file 3 and shift-click. Again, files 1-3 got selected (as expected)

(c) Multi-select files 1-3. Ctrl+Click file 5. Release ctrl key, move to
file 7 and do Ctrl+Shift+Key: files 1-3, 5-7 are now selected (as
expected!) (can't imagine an more difficult test)

I've got something similar happening to me once, and the problem proved
to be somewhere with the mouse/keyboard driver. I had an Microsoft
wireless desktop set (so keyboard + mouse from the same manufacturer,
supposedly an good manufacturer that should know how to write a Windows
driver). If I pressed the Shift key on my keyboard and then moved the
mouse, the Shift key would register un unselect event (it looked as if I
released the shift key, even those I was firmly pressing it down). This
obviously had all sorts of funny results, especially when trying to
multi-select things, and especially when trying to multi-select objects
on a Delphi form.

Is it possible that you're running into an equally-bizarre problem with
your Vista?


  • 7No.

at [2008-5-6 18:47:56]


At 10:20 AM 6/20/2007, Robert Meek wrote:
>Now I must select the first file, then I
>must hold the shift key down and pull the mouse pointer down the list of
>files until I reach the last file I want included in the group, where as
>it used to be that I could click the first file and not have to worry
>about holding the shift key down at all!


That's not happening for me. Under Vista I can do the usual that has been
working since before time:
All keys up. Click on first file. Move pointer over another file farther
down the list. Hold shift down. Click on second file. All files in between
are now selected as well as the first and second file clicked on.

Delphi mailing list -Delphi (AT) elists (DOT) org


  • 8No.