IXMLSpyPlugIn.GetUIModifications
Declaration
GetUIModifications() as String
Description
The GetUIModifications() method is called during initialization of the plug-in, to get the configuration XML data that defines the changes to the UI of XMLSpy. The method is called when the plug-in is loaded for the first time, and at every start of XMLSpy. See also Configuration XML for a detailed description how to change the UI.
Example
Public Function IXMLSpyPlugIn_GetUIModifications() As String
' GetUIModifications() gets the XML file with the specified modifications of
' the UI from the config.xml file in the plug-in folder
Dim strPath As String
strPath = App.Path
If Len(strPath) > 0 Then
Dim fso As New FileSystemObject
Dim file As file
Set file = fso.GetFile(strPath & "\config.xml")
If (Not (file Is Nothing)) Then
Dim stream As TextStream
Set stream = file.OpenAsTextStream(ForReading)
' this replaces the token '**path**' from the XML file with
' the actual installation path of the plug-in to get the image file
Dim strMods As String
strMods = stream.ReadAll
strMods = Replace(strMods, "**path**", strPath)
IXMLSpyPlugIn_GetUIModifications = strMods
Else
IXMLSpyPlugIn_GetUIModifications = ""
End If
End If
End Function