Object: ToolTipPolarContext

DIAdem 2018 Help

Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)

DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

The ToolTipPolarContext object provides information about a polar axis system in DIAdem REPORT when DIAdem calls the event assigned to the OnPolarSystem for ToolTipEvents property. DIAdem calls this event if you press the shift key and move the mouse over a REPORT object.

Note  To test the example script, you must first save the second script and register it as a user command in the dialog box that opens when you select Settings»Extensions»User Commands.

The following example creates an polar axis system and assigns the user command MyToolTipEvent to the OnPolarSystem for ToolTipEvents property:

Dim oMyPolarAxisSystem, oMyPosition, oMyCurve
Call Data.Root.Clear()
Call DataFileLoad(DataReadPath & "Report_Data.tdm","TDM","")
Call Report.NewLayout()
Set oMyPolarAxisSystem = Report.ActiveSheet.Objects.Add(eReportObjectPolarSystem,"MyPolarSystem")
Set oMyPosition = oMyPolarAxisSystem.Position.ByCoordinate
oMyPosition.X1 = 20
oMyPosition.Y1 = 20
oMyPosition.X2 = 80
oMyPosition.Y2 = 80
Set oMyCurve = oMyPolarAxisSystem.CurvesPolar.Add(ePolarShapeLine, "MyNewCurve")
oMyCurve.Shape.XChannel.Reference= "[5]/[1]"
oMyCurve.Shape.YChannel.Reference = "[5]/[2]"
Call oMyCurve.Shape.Line.Color.SetPredefinedColor(eColorIndexBlue)

'This event will be raised if the mouse is moved AND the shift key pressed 
Report.Events.ToolTip.OnPolarSystem = "MyToolTipEvent"
Call Report.Refresh()

If you press the shift key and move the mouse over the polar axis system, the example displays the mouse position and the name and the type of the subobject over which you idle the mouse. The user command receives two parameters. The first parameter corresponds with the ToolTipPolarContext object and provides the information about the polar axis system in DIAdem REPORT when you press the shift key and move the mouse over the polar axis system. The second parameter is a text and corresponds with the tooltip for display:

Sub MyToolTipEvent(Context,ToolTipText)
  Dim oSubObject
  Set oSubObject = Context.SubObject
  ToolTipText = "Sheet: " & Context.Sheet.Name & VBCrLf & "Sub object" & VBCrLf & "Name: " &  oSubObject.Name & VBCrLf & "Type: " & GetConstNameForREPORTSubObj(oSubObject, oSubObject.Type)
  ToolTipText = ToolTipText & VBCrLf & "X position: " & Context.Position.X & VBCrLf & "Y position: " & Context.Position.Y 
End Sub


Polar | Position | Sheet | SubObject


Not Helpful