Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windwos Forms UserControl Properties

Status
Not open for further replies.

schwarem

Programmer
Apr 18, 2002
159
US
I am making a UserControl to be used in other Windows Forms applications. How do I make the property in the designer be a dropdown list? I've done basic properties using text and boolean values like the one below, but I want one where I define the items in the list the user can choose from.

Code:
			[Bindable(true), 
			Category("HIVE"), 
			DefaultValue(0),
			Description("Specifies the maximum number of drop-down items in the combo box.")]
			property int MaxDropDownItems 
			{
				int get() 
				{
					return this->comboBoxFocusEntity->MaxDropDownItems;
				}
		    
				void set(int val) 
				{
					this->comboBoxFocusEntity->MaxDropDownItems = val;
				}
			}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top