Extend a field on mouseMove

fugifox

Registered User.
Local time
Today, 12:26
Joined
Oct 31, 2006
Messages
95
I'd like to implement the visual effect of
extending a (MEMO) field when mouse hovers over it.
I mean something like the pop-up menus on websites.

One solution I came up with is to use the onMouseMove action
and then opening a form at modal view, without any margins
containing only a text box-the enlarged textbox of which I wish
be extended.
But this implementation seems rather cumbersome to me,
while I also find difficulties on tacking when the mouse is over
textbox and when goes outside it, in order to close the pop-up.

Do have you anything else to suggest?

Thanks in advance
 
To expand only if there's data in the control:
Code:
Private Sub YourControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   Me.YourControl.SetFocus
   If Not IsNull(Me.YourControl.Value) Then
      DoCmd.RunCommand acCmdZoomBox
   End If
End Sub
If you want the text box to zoom for initial data entry as well .
Code:
Private Sub YourControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   Me.YourControl.SetFocus
   DoCmd.RunCommand acCmdZoomBox
End Sub

I've tried this and found it was very distracting in that it expands the control even when the user doesn't mean to, but only accidentally mouses over the control. I usually put the same code in the control's Double Click event, which gives the user more positive control. If you take this approach you need to omit the Me.YourControl.SetFocus line.

I do have some code, I think, for doing something along the lines you suggested above, but it is a good deal more cumbersome, as you surmised.
 

Users who are viewing this thread

Back
Top Bottom