Testing the IconButton Control

Testing the IconButton is as simple as creating a new Windows Forms project and customizing the Toolbox to display the IconButton. Create a new Windows Forms project and then right-click on the Toolbox to bring up the context menu shown in Figure 2.8, and select Customize Toolbox. This brings up the Customize Toolbox dialog, which you can use to browse for the compiled DLL created for the IconButton (see Figure 2.9).

Figure 2.8. The Toolbox context menu.


Figure 2.9. The Customize Toolbox dialog.


Click OK and a Toolbox item for the IconButton appears at the bottom of the Windows Forms tab. As with any other controls, select the IconButton and drag it onto the form. With the IconButton selected, use the property browser to assign an icon to the button. Notice that a dialog appears and that when an icon file is selected, the property browser is updated and the control renders the icon. How does this happen? Well, this is the subject of the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.200.197