mouseover(constant)
| Function group | Execute on client | Platform(s) |
|---|---|---|
| Mouse | NO | All |
mouseover(constant)
mouseover(constant[,tablefield])
Note: This function is for desktop apps using Window classes only, not web or mobile apps.
Returns information about the mouse position defined by a predefined constant at the instant the function is evaluated.
Returns information about the mouse position defined by a mouseover constant (e.g. kMLine) when mouseover is called. If using kMItemref and tablefield is kTrue, enterable grid row fields are checked; in this case, the function will return a reference to the field under the mouse in a complex grid.
The function only works in an "open" user-defined window (not reports or searches). Moreover, it returns references only for fields and not background objects (text and graphic objects).
The mouse position is returned in a variety of ways depending on the constant you use. You can use the following constants:
| Constant | Description |
|---|---|
| kMCharpos | returns the nth character in an edit field. |
| kMComplexGridRow | returns the row of a Complex grid the pointer is over |
| kMHorz | returns the horizontal position of the mouse relative to the topmost open user-defined window; if no user-defined window is open, returns the horizontal position of the mouse relative to the Omnis application window |
| kMItemref | returns a reference to the object under the mouse. The window instance itself can be returned as item 0 of the window. |
| kMLine | returns the line number for a list. |
| kMPLine | returns the line of the parent list the mouse is over. |
| kMScreenPos | returns a row with 2 columns, h and v, which are the horizontal and vertical position of the pointer (mouse) in screen coordinates, respectively |
| kMScreenPos | returns a row with 4 columns: h and v are the horizontal and vertical position of the pointer (mouse) in screen coordinates, respectively; mainh and mainv are the pointer (mouse) position relative to the Omnis main window. On Windows, these are the coordinates relative to the application window, whether the main window is maximised or whatever monitor it is on. On macOS, mainh and mainv are the same as h and v |
| kMVert | returns the vertical position of the mouse relative to the topmost open user-defined window; if no user-defined window is open, returns the relative position to the Omnis application window |