Using the UITypeEditor Class

If you have started wondering how to display list boxes, NumericUpDown controls, little boxes that contain colors, or dialog boxes for editing properties in the IDE, you have come to the right place. By creating a custom UITypeEditor instance you can add enhanced property editing to your custom control. To demonstrate I will show you how to display a list of states to choose from—a custom type editor—and how to associate that type editor and provide a default value for the State combobox in the AddressUserControl.

To implement a drop-down list of states in the AddressUserControl's State combobox, we need to define a custom type editor and provide an overridden implementation for the methods EditValue and GetEditStyle ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.