I have a custom tooltip that I'm using and I've found that when hovering over an asset, it can sometimes lead to a situation where the popup blocks the mouse, causing it to close and reopen. Is there a way to provide a greater offset for the popup? I'm thinking I probably need to use a script to open the popup with a certain offset from the mouse. Any help is appreciated. Thanks!
def runAction(self, event):
# Get the bed name from the custom property
BED = self.view.params.BED
# Get the CC parameter from the custom property
CC = self.view.params.CC
# Call the custom function to get the jams tag values
jamsTagValuesList = BedTooltip.getValues(CC, BED)
# Initialize tooltip text
tooltipText = "Bed: {}\n".format(BED)
# Build the tooltip text with tag values
for tag in jamsTagValuesList:
tooltipText += "{} : {}\n".format(tag['tagName'], tag['value'])
lines = tooltipText.split("\n")
self.custom.Lines = len(lines)
# Update the tooltip text and make it visible
self.custom.ToolTip = tooltipText
I can't quite follow the logic of what you are doing, but have you specified meta.tooltip.location
to something other than mouse
? The other options anchor the tooltip relative to the component rather than the cursor.
Im using just a event popup no scripting for popup window . I want it to pop up next to the mouse just not in the way so that it closes. I'm just defining that i want it relative to the bottom right of the mouse but there is no option on how far away from the mouse . The script is to browse tags and update the ToolTip on hover and its trying to calculate the lines needed based on the Pre whitespace \n so that it can set the window size based on the number of tags for that asset.
For what I see on the video the issue happens when you cross the border line, maybe take out the border line works.
There is a Close popup window on mouse exit the popup makes the mouse exit the focused asset . can get into a cycle where it makes it close then pop up multiple times before you can get over to stop it . i just need to look into relative to mouse plus x amount to give a buffer so the mouse wont end up over the popup.
I'm confused as well, looks like a tooltip to me.
Sorry for the Confusion im calling a "TOOLTIP" because it kinda is but im aware there is a tooltip aswell for a view. Mine is a view that i popup based on a mouse enter event.
Try scripting the popup instead of using a popup action.
system.perspective.openPopup | Ignition User Manual has
Type |
Parameter |
Description |
Dictionary[String, Integer] |
position |
Dictionary of key-value pairs to use for position. Possible position keys are: left, top, right, bottom, width, height. Defaults to the center of the window. [optional] |
|
|
|
This looks a lot more flexible and you should be able to read the position of your target object and offset that into the position
dictionary of the popup.
Can you help us understand why using an actual tooltip is not desired?