[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

BeeJ

11/15/2011 7:43:00 PM

How do they do that so I can do it too?

Creating a UserControl with drawn grid like appearance.
Cells containing text.

If I left-click drag from any cell to another cell within the UC I want
to do multi-select.

If I drag from the cell off the UC I want drag.

I.E. like Windows Explorer.


5 Answers

Jeff Johnson [MVP: VB]

11/15/2011 9:54:00 PM

0

"BeeJ" <nospam@spamnot.com> wrote in message
news:j9ufc0$n7e$1@speranza.aioe.org...

> How do they do that so I can do it too?
>
> Creating a UserControl with drawn grid like appearance.
> Cells containing text.
>
> If I left-click drag from any cell to another cell within the UC I want to
> do multi-select.
>
> If I drag from the cell off the UC I want drag.
>
> I.E. like Windows Explorer.

Simple answer: "they" examine the mouse messages and act accordingly.

More complexity: Note that if you click on a FILE in Windows Explorer you
will immediately begin dragging, so it's also important WHERE the click
begins. In Access, for example, when you have a table open, you have to
click in a specific place (basically near a border where the cursor changes
to a big plus, like Excel) in order to select entire cells instead of text.


BeeJ

11/15/2011 10:08:00 PM

0

WE seems to make the distinction of on-text vs off-text.
On-text starts a drag.
Off-text starts a select rectangle.
WE shows a black NOT icon for initial on-text drag.
All consistent across applications?


Jeff Johnson [MVP: VB]

11/15/2011 10:37:00 PM

0

"BeeJ" <nospam@spamnot.com> wrote in message
news:j9unsk$lb7$1@speranza.aioe.org...

> WE seems to make the distinction of on-text vs off-text.
> On-text starts a drag.
> Off-text starts a select rectangle.
> WE shows a black NOT icon for initial on-text drag.
> All consistent across applications?

That's because Windows Explorer detects that, unless you've yanked the mouse
across the screen, you're still in the same folder that the file lives in,
and the file can't be moved to the same location. Again, it's all mouse
processing and decision making. "Where am I now? What kind of feedback
should I give based on where I am?"


Dee Earley

11/16/2011 8:52:00 AM

0

On 15/11/2011 19:43, BeeJ wrote:
> How do they do that so I can do it too?
>
> Creating a UserControl with drawn grid like appearance.
> Cells containing text.
>
> If I left-click drag from any cell to another cell within the UC I want
> to do multi-select.
>
> If I drag from the cell off the UC I want drag.
>
> I.E. like Windows Explorer.

For the dragging, at the lowest level, implement the
MouseDown/MouseMove, and OLEDrag* events.
You can decide what to put in the drag and what the user can do with it
on mousedown and then call the StartDrag method (I think), or draw a
rubber band and highlight the text in the particular cells.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

BeeJ

11/18/2011 12:41:00 AM

0

Putting dragging on the back burner.
Why? because a scrolling list is a little beyond my though processes
yet. I have coded doing it for a non-scrollable list but decided to
spend my time on other more pertinent code.