Page 1 of 1

Default Properties for Custom Controls...

Posted: Fri Aug 07, 2009 11:55 am
by ConvertFromOldNGs
by JADE Kid - Ray Hidayat >> Wed, 5 Jul 2000 22:08:46 GMT

Just wondering... how can you set the default properties for custom controls?

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

Re: Default Properties for Custom Controls...

Posted: Fri Aug 07, 2009 11:55 am
by ConvertFromOldNGs
by Craig Shearer >> Thu, 6 Jul 2000 0:35:59 GMT

Set whatever you want in the create method of the control class. The create method is called when the control is first painted on a form in the Painter. After then, when the control is loaded onto the form, it is cloned, and the create method never executes again.

For stuff you want to do each time the control is loaded, stick that stuff in the windowCreated method.

Craig.