Le 2 sept. 06 à 22:56 Soir, Terry Ford a écrit:
On Sep 2, 2006, at 1:34 PM, Arnaud Nicolet wrote:
Le 2 sept. 06 à 19:05 Soir, [EMAIL PROTECTED] a écrit:
On Sep 02, 2006, at 16:28 UTC, Robert Poland wrote:
The Window KeyDown event works fine with the Mac.
Not in general, it doesn't. Any key the EditField processes itself
won't get to the Window. Whether the EditField processes return,
enter, and tab depend on the EditField settings, as well as
(apparently) the platform you're running under. The EditField
KeyDown
event is the right place for this code.
For instance, on Mac OS X, when you have a multiline editfield
(which has the focus) and a pushbutton (default=true), the return
key inserts a new line (in the field) while the enter key presses
the button. Is that the explanation about the difference between
Mac/Win32?
One of them.
(also, usually, under Mac return=chr(13) and enter=chr(3) while,
on Win32, both have the same ascii value; there are many
differences).
The difference between the two enter keys on Windows can be trapped
by using the Keyboard Module routines. By checking the actual
Keycode in the KeyDown event, one can determine which key was
pressed. Robert never provided much to go on (as far as actual
code) so it was a guessing situation in regard to his overall problem.
When checking for Keydown, MouseDown and others it is usually best
to check in the actual event of the control as opposed to a general
Window event. This is particularly true in EditFields that can
respond differently by adjusting their properties.
Adding a message (MsgBox) in the event also didn't help as it
disrupts the normal execution of the built-in Rb code with spurious
results.
Not understanding the effect of Return True in many events also
compounds the matter.
Thank you.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>