Vizard 8 » Command Index » Vizard modules » viztip » <viztip>.visible
8.1

<viztip>.visible

Sets the visibility of the tooltip

<viztip>.visible(  
state = viz.ON # On or Off
)  
state = viz.ON
Specify whether to hide (viz.OFF), make visible (viz.ON), or toggle the current state (viz.TOGGLE)

Remarks

This command sets the visibility of the tooltip.

Return Value

None

Example

import viz
viz.go()

viz.add('tut_ground.wrl')

#Create models with tooltip text
ball1 = viz.add('ball.wrl',pos=(-2,1,5))
ball1.tooltip = 'Ball 1'

ball2 = viz.add('ball.wrl',pos=(0,1,5))
ball2.tooltip = 'Ball 2'

ball3 = viz.add('ball.wrl',pos=(2,1,5))
ball3.tooltip = 'Ball 3'

#Create a tool tip object
import viztip
tip = viztip.ToolTip()

tip.message('Toggle the tooltip with the spacebar')
tip.translate(275,50)

vizact.onkeydown(' ',tip.visible,viz.TOGGLE)