Appendix A - Extender Providers

function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); }

IN THIS CHAPTER

  • Creating Extender Providers

  • Control-Based Extender Providers

Although not a control, Extender Providers allow for properties to be added to .NET components. The ToolTip component is an example of an Extender Provider. The ToolTip component allows a ToolTip window to be associated within one or more controls on a form. The ToolTip component adds the ToolTip property to each control on the form. This ToolTip property is then displayed in the Property Browser when a control is selected.

To see how to implement and use Extender Providers, two separate components will be created. The first component will be used to highlight a control when the mouse passes over it. This Extender Provider will enable the highlight to be specified during design-time. In addition to this first extender, a second extender will be implemented to provide feedback for menu options. This second extender will demonstrate how to apply extenders to classes such as the MenuItem component that are not derived from the Control base class.



    .NET Windows Forms Custom Controls
    User Interfaces in VB .NET: Windows Forms and Custom Controls
    ISBN: 1590590449
    EAN: 2147483647
    Year: 2002
    Pages: 74

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net