Current task requires to allow visibility over a customed label integrated on a a view to display text mapped on the view and basically act as a tooltip. Is there an expression to simply allow visibility on hover? As on the “Configure Events…” section tooltip not always show up and in random positions as on this case it would most likely be required to be customed. Many thanks
Is this Perspective or Vision?
You will probably want to use a combination of onMouseOver and onMouseOut events. Use those to trigger visibility of the label.
Is this possible through a script?
What do you want to script? The events are based on mouse actions, those events are scripts that you can use to change the visibility.
How do I toggle visibility through there?
use the script action and then set the visibility of the object to true or false.
It wont let me write anything on the script area?
Can you show what you mean? Once you have selected script from the actions you should be able to go all the way to the bottom and start typing in there.
OK it works. Now may I ask an example of the script? That’s what I have and doesnt work atm
self.getSibling(“tooltip2style”).meta.visible = true , false
self.getSibling(“tooltip2style”).meta.visible = true
self.getSibling(“tooltip2style”).meta.visible = false
If those don’t work please post the error
Unable to run action ‘dom.onMouseOver’ on Symbols/Conv_Horizontal@D$0:0:8/root/Medium vertical segment: code could not be compiled.
Would this have to do with the fact that Im configuring event in a view to toggle a seperate label which is located on that view?
Can you post the entire stack trace from the error? Use three of the ` at the beginning and end to properly format it so we can read it.
‘’‘Unable to run action ‘dom.onMouseEnter’ on Symbols/Conv_Horizontal@D/root/tooltip2style: code could not be compiled.’’’
SyntaxError: (“mismatched input ‘self’ expecting INDENT”, (‘function:runAction’, 2, 0, ‘self.meta.visible = true\t\n’))
Your code isn’t formatted properly. Need to have a tab in front of it.
It actually did work. Thanks for your time.
Now is there a way of linking the size of the label to accordinate view size so it can be made once as an overall component to be used multiple times in pages?
You could create it as a view and then just embed it where you need it.
I am looking to make a standard component view to be used in pages multiple times possibly more than 200 times hence it would be ideal to make a standard component that has all the features required. Thanks for your time though