DIAdem Help

Object: ToolTip3DTableContext

  • Updated2024-09-12
  • 2 minute(s) read

Object: ToolTip3DTableContext

The ToolTip3DTableContext object provides information on a 3D table in DIAdem REPORT when DIAdem calls the event assigned to the OnTable3D 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 a 3D table and assigns the user command MyToolTipEvent to the OnTable3D for ToolTipEvents property:

Dim oMy3DTable, oMyPosition, oMyX, oMyY, oMyZ, oMySettings
Call Data.Root.Clear()
Call DataFileLoad(DataReadPath & "Report_Data.tdm","TDM","")
Call Report.NewLayout()
Set oMy3DTable = Report.ActiveSheet.Objects.Add(eReportObject3DTable,"My2DTable")
Set oMyPosition = oMy3DTable.Position.ByBorder
oMyPosition.Top = 20
oMyPosition.Bottom = 20
oMyPosition.Left = 20
oMyPosition.Right = 20
Set oMyX = oMy3DTable.X
Set oMyY = oMy3DTable.Y
Set oMyZ = oMy3DTable.Z
Set oMySettings = oMy3DTable.Settings
oMySettings.UseAutoFontSize = False
oMyX.Channel.Reference = "[2]/[1]"
oMyX.Font.Size = 2
oMyX.Format = "d.dd"
oMyY.Channel.Reference = "[2]/[2]"
oMyY.Font.Size = 2
oMyY.Format = "d.dd"
oMyZ.Channel.Reference = "[2]/[3]"
oMyZ.Font.Size = 2
oMyZ.Format = "d.dd"

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

If you press the shift key and move the mouse over the 3D table, 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 ToolTip3DTableContext object and provides the information about the 3D table in DIAdem REPORT when you press the shift key and move the mouse over the 2D table. 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

Properties

Position | Sheet | SubObject | Table3D