Inheritance
Context PPGEventContext
Introduced
6.0
Description
This object is provided as the context object in the PPGEvent callback for a plugin-based CustomProperty object (see PluginRegistrar::RegisterProperty) implemented in C#.
Using the information provided by this object, it is possible to implement PPG logic code using the .NET languages such as C# and VB.NET. For information about implementing logic with scripting languages, see PPGLayout.Logic.
The PPGEventContext.EventID function returns information about the specific event that occurred. If the event is siOnInit or siOnClosed then Context.Source returns the CustomProperty object that is being inspected. If the event is siParameterChange then Context.Source returns the Parameter that changed. If the event is siButtonClicked then call Context.GetAttribute to get the attribute "Button", which will return the script name of the Button that was clicked. If the event is siTabChange then call Context.GetAttribute to get the attribute "Tab", which will return the label of the Tab that was clicked.
To force the user interface to be redrawn, call Context.SetAttribute to set the attribute "Refresh" to true. This is useful if the context code changes the underlying PPGLayout during its execution. Similarly, it is possible to close the Property Page by setting the attribute "Close".
The OnChange callback for parameters is only invoked when a user is currently inspecting the property page. However, it may be either the user who changed the value on the inspected page or a change initiated through scripting (excluding a change originating from a callback function, of course). For example, if Parameter X is changed, and the callback code sets Parameter Y to the same value as X, then the PPGEvent is not invoked a second time.
Methods
Properties
See Also
SOFTIMAGE|XSI v6.01