MouseOver Help

When the mouse passes over objects on a form, it is frequently useful to display a help message in the status bar.

Paradox | MS Access | Delphi | Visual Basic | Java


Paradox

This method places all the help messages in a table. This allows the number of messages and their text to be changed without having to edit the form itself. A useful idea.

All the code is attached to the form - the components have no code for this feature. A global TCursor points to message.db. As the mouse moves, the code determines which object it is over and displays the associated message. To clear the status line on mouseOut, simply define a blank message for whatever is behind the component.

Var
 Message_Help_TC  TCursor
endVar Var

method open(var eventInfo Event)

  if eventInfo.isPreFilter() then
    ;// This code executes for each object on the form:

  else
    ;// This code executes only for the form:
    Message_Help_TC.open("message")
  endif

endmethod open

method mouseMove(var eventInfo MouseEvent)
var 
  tempUI UIObject
endvar

  if eventInfo.isPreFilter() then
    ;// This code executes for each object on the form:
    eventInfo.getTarget(tempUI)
    if Message_Help_TC.locate("Object Name", tempUI.name) then
      message (Message_Help_TC."Message Help")
    endif
  else
    ;// This code executes only for the form:

  endif

endmethod mouseMove


MS Access 97

When the mouse hovers over a control for several seconds, the string assigned to ControlTip Help will be displayed in a little yellow pop-up box.

The string assigned to Status Bar Text is displayed when the field is selected or the button is pressed (ie, you have to click to see the string).


Delphi 5.0


Visual Basic 6.0


Java


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Databases / MouseOverHelp.html