dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Mouse question


From: Rhys Weatherley
Subject: Re: [DotGNU]Mouse question
Date: Tue, 02 Sep 2003 16:12:20 +1000
User-agent: KMail/1.4.3

On Tuesday 02 September 2003 04:10 pm, Brian Luft wrote:

> 1.  I wrote a function to return the width of the three border styles.
> Since this can vary between themes, I put this into
> IThemePainter/DefaultThemePainter.  Is this the best place for this?

Probably.  Put it there for now and we'll review the patch when it arrives and 
see if an alternative may be warranted.

> 2.  I want to support the case when the user is selecting list items by
> clicking and dragging, and then drags the mouse above or below the list
> box.  This should make the listbox scroll in that direction, and select
> the items on the way.  I've been using OnMouseMove for dragging inside
> the control, but I don't know how to get mouse move messages when the
> cursor is outside the control.

Under X, when the mouse is clicked and then dragged outside the window 
boundaries, all messages will go to the window until the mouse is released, 
regardless of where it is on the screen.  Under Windows, you need to set the 
Capture property to true on mouse down to make this happen.  Since Capture is 
ignored under X, it is safe to always do this regardless.

You will need to install a timer to make the list box periodically scroll when 
the mouse is held down outside the window without being moved.  But there 
should be no need to capture global mouse events.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]