Object Model - Common Methods and Functions - ApplyTimingOverrides

This method applies the timing-values stored in a TTTimingOverride-object to the tooltip-component.

[Visual Basic]
Public Sub ApplyTimingOverrides( _
	ByVal timingOverride As TTTimingOverride
public void ApplyTimingOverrides(
	TTTimingOverride timingOverride 



A TTTimingOverride-object which contains the timing-values for a tooltip component.


This method applies the timing-values stored in a TTTimingOverride-object to the tooltip-component in order to override the default values defined for the component. Usually this method is used internally by the ApplyOverrides()-method of the different components. Only ApplyOverrides() makes sure that the component saves the complete current layout before the override-values are applied. The saved layout can later be restored with a call to RestoreOriginalLayout(). This ApplyOverrides()-RestoreOriginalLayout()-cycle happens automatically for the override-values defined through the Override-property of a control (see Provided Properties).

ApplyTimingOverrides() does not make such a copy of the layout-values it is going to change! If ApplyTimingOverrides() is going to be used directly to apply new timing-values, the application developer is responsible to make sure that the original (or default) values can be restored.

Actually, the only scenario, where the direct use of ApplyTimingOverrides() could be useful, is if the override-values specified for a control should also dynamically be overridden. (E.G. the InitialDelay for the tooltip of a specific control should look different every time the tooltip does pop-up.) 


The following code creates a TTTimingOverride-object, sets the values for the timing-properties to be overridden and applies it to the component.

'Declare and create an instance of TTTimingOverride...

Dim myTiming As ToolTipsFactory.Shared.TTTimingOverride

myTiming = New ToolTipsFactory.Shared.TTTimingOverride


'Assign values to the properties to be overridden..




'Apply the new timing-values to the component...


After the execution of this code, the next time a tooltip, provided to a control by MultiLine, will be displayed, it will appear after the applied 200 ms and remain visible for 2000 ms. If the original timing-values have not been saved somehow, the applied values will become the default timing-values for the tooltips of all controls on the same form.