ToolTipsFactory |
Member of AnimationTT ImageTT SingleLineTT MultiLineTT
This method applies an override-layout stored in a AnimationTTOverride-object to the AnimationToolTip-component.
[Visual Basic] Public Sub ApplyOverrides( _ ByVal Override As AnimationTTOverride )
[C#] public void ApplyOverrides( AnimationTTOverride Override );
Parameters
Override
An AnimationTTOverride-object which contains a complete AnimationToolTip-layout.
Member of AnimationTT ImageTT SingleLineTT MultiLineTT
This method applies an override-layout stored in an ImageTTOverride-object to the ImageToolTip-component.
[Visual Basic] Public Sub ApplyOverrides( _ ByVal Override As ImageTTOverride )
[C#] public void ApplyOverrides( ImageTTOverride Override );
Parameters
Override
An ImageTTOverride-object which contains a complete ImageToolTip-layout.
Member of AnimationTT ImageTT SingleLineTT MultiLineTT
This method applies an override-layout stored in a MultiLineTTOverride-object to the MultiLineToolTip-component.
[Visual Basic] Public Sub ApplyOverrides( _ ByVal Override As MultiLineTTOverride )
[C#] public void ApplyOverrides( MultiLineTTOverride Override );
Parameters
Override
A MultiLineTTOverride-object which contains a complete MultiLineToolTip-layout.
Member of AnimationTT ImageTT SingleLineTT MultiLineTT
This method applies an override-layout stored in a SingleLineTTOverride-object to the SingleLineToolTip-component.
[Visual Basic] Public Sub ApplyOverrides( _ ByVal Override As SingleLineTTOverride )
[C#] public void ApplyOverrides( SingleLineTTOverride Override );
Parameters
Override
A SingleLineTTOverride-object which contains a complete SingleLineToolTip-layout.
Description - All ToolTips
This methods do apply the override tooltip-layout stored in the passed Override-object to the respective tooltip-component in order to override the default values defined for the component. ApplyOverrides() makes sure that the component saves the 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).
Example
The following code saves the override-layout defined for a specific control (cntrl) into a standard ToolTipsFactory tooltip layout-file (target). Because the Override-objects do not provide such an option, we have to use a work-around which makes use of the possibilities provided by the methods discussed above. Before we can save the override-layout of cmdOk to file, we have to apply it first to the tooltip-component that provides the tooltips. Only then we can save the component's layout to file. Now, in order to get back the default layout for the tooltip component, we just have to call RestoreOriginalLayout().
Private Sub SaveOverrideLayout(ByVal cntrl As Control, target As String)
'We assign the override-object to a variable
'to make the code more readable...Dim myOverrides As MultiLineTTOverride
myOverrides = Me.MultiLine.GetMultiLineToolTip(cntrl).Override
'Apply the Override-layout to the component...
Me.MultiLine.ApplyOverrides(myOverrides)'Save the (overridden) layout into a file....
Me.MultiLine.SaveLayout(target)'This restores the previously active layout...
Me.MultiLine.RestoreOriginalLayout()End Sub