I think the issue is with Wait Window Nowait not with MouseEnter or MouseLeave, as as soon as you move the mouse the wait window closes, so you need to stop your mouse movement just when the wait windows appear, which must be why you see it working occasionally, ie try this:
loForm = CREATEOBJECT('myForm')
loForm.Show(1)
DEFINE CLASS myForm as Form
ADD OBJECT myTextbox as myTextbox
ADD OBJECT myWWTextbox as myWWTextbox WITH TOP = 22
ENDDEFINE
DEFINE CLASS myTextbox as TextBox
PROCEDURE MouseEnter(nButton, nShift, nXCoord, nYCoord)
ACTIVATE SCREEN
? 'Mouse entered at ', DATETIME()
ENDPROC
PROCEDURE MouseLeave(nButton, nShift, nXCoord, nYCoord)
ACTIVATE SCREEN
? 'Mouse left at ', DATETIME()
ENDPROC
ENDDEFINE
DEFINE CLASS myWWTextbox as TextBox
PROCEDURE MouseEnter(nButton, nShift, nXCoord, nYCoord)
WAIT WINDOW 'Mouse entered at ' + TRANSFORM(DATETIME()) NOWAIT
ENDPROC
PROCEDURE MouseLeave(nButton, nShift, nXCoord, nYCoord)
WAIT WINDOW 'Mouse left at ' + TRANSFORM(DATETIME()) NOWAIT
ENDPROC
ENDDEFINE
>Hi All
>Is there a trick to get MouseEnter and MouseLeave to work on a Textbox?
>If I use the Wait Window Nowait function in MouseEnter nothing happens most of the time when the mouse enters. Very occasionally it does, but very intermittant.
>Thanks and regards
>John
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges