[Gambas-user] CheckBox_MouseUp huge PB

Jean-Yves F. Barbier 12ukwn at ...626...
Sun Aug 23 22:52:58 CEST 2009


Benoît Minisini a écrit :
>> Fabien Bodard a écrit :
>>> it seem that the click event is send after the .value setting... but
>>> the MouseUp before.
>>>
>>> why did you not use the click event ?
>> I don't use it because it is raised after the .Value has changed and I
>> need to be able to forbid any change in some conditions.
> 
> - You can't assume any relationship between Mouse events and the Click event 
> raised when the value has changed.

That's NOW obvious, but not @ first glance and without a test to see exactly
which order is given to events.

> - If the checkbox should not be changed, then it must be disabled before the 
> user tries to change it.

That doesn't prevent MouseDown/Up etc events to be raised (remember, I use 
it for 2 purposes: display and set/unset; BTW, Fabien, that remember me why 
I didn't used the Click event: it is also raised when the application change 
the .Value of the CheckBox)

That may also me that pops: I didn't programmed for many years and I'm also
working on database (which has a very different logic), while making some
tests under Erlang (which has an alien logic).

JY

-- 
Lost: gray and white female cat.  Answers to electric can opener.




More information about the User mailing list