Question order of properties in usercontrol

BMaster

New member
Joined
Dec 10, 2008
Messages
1
Programming Experience
5-10
Hi,

I am creating a usercontrol, which is in fact a more sophisticated textbox. One of the properties is "style" which lets the user choose between for example "numerical", "text" or "datetime". Another property is "defaulttext" which sets the default text of the textbox in case the user leaves the textbox empty. My problem happens when I add the control to a form in an application: in the InitializeComponent of that form, all the properties of the control are listed in alphabetical order. That means that the "defaulttext" property is set first, before the "style" property. But in the "defaulttext" property I do some validation (for example check for alphanumeric characters in case the "style" is "numerical") which then fails because there's no style set. I hope I explained it well.... Is there a way to solve this?

Thanks!
 
Back
Top