Bonnie,
Thanks. That was one of the things I had tried, but that isn't the behavior I'm after. What I want is for the default value of the property to be DropDownList, but still be changeable at design-time by the developer. And if you right-click the property on the property sheet and click Reset, then I want it to be reset to DropDownList. I know this has to be possible and
should be easy.
TIA,
Chad
>Chad,
>
>If you want the DropDownStyle to always be DropDownList, then set it in the constructor of the class rather
than try to override the property:
>
>using System;
>using System.Drawing;
>using System.Collections;
>using System.ComponentModel;
>using System.Windows.Forms;
>using System.Data;
>
>namespace MyCompany.WinUI.MyClasses
>{
> public class MyComboBox : System.Windows.Forms.ComboBox
> {
> public MyComboBox()
> {
> // Override settings with new default values in the constructor.
> this.DropDownStyle = ComboBoxStyle.DropDownList;
> }
> }
>}
>
>
>~~Bonnie
_________________________________
There are 2 types of people in the world: