Re: Win32lib V0.53 available.

new topic     » goto parent     » topic index » view thread      » older message » newer message

I gave a "nod" to accessibility issues with the time element. It means th=
at
someone can change the reaction time (and movement tolerances) if they ne=
ed
to. The defaults I used of 0.5 seconds and a 2-pixel box around the initi=
al
mousedown seem to work well for me. But people are free to change their
setup, of course. I was think of letting people choose to equate
left-mousedown with a mouse click gesture as an option as well. Should we
bother?


Here is an extract from the VB docs...


Visual Basic Reference

Click Event

Occurs when the user presses and then releases a mouse button over an
object. It can also occur when the value of a control is changed.

For a Form object, this event occurs when the user clicks either a blank
area or a disabled control. For a control, this event occurs when the use=
r:

Clicks a control with the left or right mouse button. With a CheckBox,
CommandButton, Listbox, or OptionButton control, the Click event occurs o=
nly
when the user clicks the left mouse button.


Selects an item in a ComboBox or ListBox control, either by pressing the
arrow keys or by clicking the mouse button.


Presses the SPACEBAR when a CommandButton, OptionButton, or CheckBox cont=
rol
has the focus.


Presses ENTER when a form has a CommandButton control with its Default
property set to True.


Presses ESC when a form has a Cancel button - a CommandButton control wit=
h
its Cancel property set to True.


Presses an access key for a control. For example, if the caption of a
CommandButton control is "&Go", pressing ALT+G triggers the event.
You can also trigger the Click event in code by:

Setting a CommandButton control's Value property to True.


Setting an OptionButton control's Value property to True.


Changing a CheckBox control's Value property setting.
Syntax

Private Sub Form_Click( )

Private Sub object_Click([index As Integer])

The Click event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To
list.
index An integer that uniquely identifies a control if it's in a control
array.


Remarks

Typically, you attach a Click event procedure to a CommandButton control,
Menu object, or PictureBox control to carry out commands and command-like
actions. For the other applicable controls, use this event to trigger
actions in response to a change in the control.

You can use a control's Value property to test the state of the control f=
rom
code. Clicking a control generates MouseDown and MouseUp events in additi=
on
to the Click event. The order in which these three events occur varies fr=
om
control to control. For example, for ListBox and CommandButton controls, =
the
events occur in this order: MouseDown, Click, MouseUp. But for FileListBo=
x,
Label, or PictureBox controls, the events occur in this order: MouseDown,
MouseUp, and Click. When you're attaching event procedures for these rela=
ted
events, be sure that their actions don't conflict. If the order of events=
 is
important in your application, test the control to determine the event
order.

Note   To distinguish between the left, right, and middle mouse buttons, =
use
the MouseDown and MouseUp events.

If there is code in the Click event, the DblClick event will never trigge=
r,
because the Click event is the first event to trigger between the two. As=
 a
result, the mouse click is intercepted by the Click event, so the DblClic=
k
event doesn't occur.




-------------------------------------------------------------------------=
---
----

Send feedback on this article.  Find support options.

=A9 2000 Microsoft Corporation. All rights reserved. Terms of use.


------------------
I think the win32lib's use of Click is more consistent. The sequence is
always MouseDown, Click and MouseUp, and DoubleClicks are always possible
(unless a specific control traps them first).

----
cheers,
Derek.

----- Original Message -----
From: "Cuny, David at DSS" <David.Cuny at DSS.CA.GOV>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Friday, September 22, 2000 4:55 AM
Subject: Re: Win32lib V0.53 available.


> Derek Parnell wrote:
>
> > Thanks David, I'm not convinced just yet,
> > so I'll research it again.
>
> I owe you an apology.
>
> I just coded a demo in VBA/Word, and the UserForm_Click event isn't
> triggered until the MouseUp. Just a plain MouseUp won't do it - you hav=
e
to
> start the click on the form.
>
> However, there's no time limit between the initial click and release - =
It
> looks like it actually *captures* the mouse on the mousedown, although
it's
> hard to tell, since the dialog is modal.
>
> A bit more humbly,
>
> -- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu