Object Model - Additional Methods and Functions - GetAnimationToolTip

Returns the AnimationTTDatasource-object provided as extended property to a specific control.

[Visual Basic]
<ExtenderProvidedProperty()> _ 
Public Function GetAnimationToolTip(ByVal acontrol As Control) As AnimationTTDataSource
public AnimationTTDataSource GetAnimationToolTip(
	Control acontrol



The control, for which to retrieve the provided AnimationTTDatasource-object.


This function is used to get access to the AnimationTTDatasource-object of a specific control (acontrol) on the same form as the tooltip-component. An instance of this object is provided to each control on the same form by the AnimationToolTip-component (ToolTipsFactoryAnimation). It is this object which holds the tooltip-content (and some other properties) used for the tooltip to be displayed for the specific control.

In the Visual Studio property-grid the access to the AnimationTTDatasource-object of a specific control is seamlessly integrated in the property-list of the specific control. (See the chapter on "Provided Properties" for more information.)

To get access to the AnimationTTDatasource-object of a specific control through code, things are not exactly as one would expect: The AnimationTTDatasource-object is a property provided to a control by the tooltip component, and - if looking at the property-grid of the control - it definitely seems to be just a normal property of that control, but if you try to access this property by code as any other property of the control, you'll see that this is not possible, because the control does not expose such a property. Actually, the control, to which the tooltip-component provides this property, has absolutely no knowledge about this provided property, because this extended properties are managed by the providing component (in this case the AnimationToolTip-component). Therefore the programmatic access to this properties has to happen through the providing component.  And that's where GetAnimationToolTip() comes into play. GetAnimationToolTip() requests and returns a reference to the AnimationTTDatasource-object provided to the control (acontrol) specified in the function-call.

The following example shows how this looks in code:


Dim myToolTipDS As AnimationTTDataSource


'Get a reference to the AnimationTTDataSource-object

'of Label1

myToolTipDS = Me.AnimationTT.GetAnimationToolTip(Me.Label1)


'Through this reference we get now full access to all

'properties of this object. In this example we

'use this to assign new content (a dynamically

'computed movie-clip) for the tooltip displayed

'by Label1...

myToolTipDS.AnimatedSymbol = CreateMovie()