Provides a set of methods for determining the parent and child components of a control.
For a list of all members of this type, see IVisualTipExtender Members.
This interface enables you to add VisualTips support to custom controls which do not already provide it.
There are two steps to adding VisualTips support to a custom control. First, create a custom type which implements IVisualTipExtender. Second, invoke SetExtender, passing the System.Type of the custom control and an instance of the type which implements IVisualTipExtender.
The methods of IVisualTipExtender are:
The standard .NET ToolBar control is already supported by VisualTips. However, if you were to implement it manually, your code might look something like this:
[C#]
private class ToolBarExtender : IVisualTipExtender
{
public object GetChildAtPoint(Control control, int x, int y)
{
ToolBar toolbar = control as ToolBar;
foreach (ToolBarButton button in toolbar.Buttons)
{
if (button.Rectangle.Contains(x, y))
return button;
}
return null;
}
public object GetParent(object component)
{
return (component as ToolBarButton).Parent;
}
public Type [] GetChildTypes()
{
return new Type [] { typeof(ToolBarButton) };
}
}
Namespace: Skybound.VisualTips
Assembly: Skybound.VisualTips (in Skybound.VisualTips.dll)
IVisualTipExtender Members | Skybound.VisualTips Namespace