Default Properties for Custom Controls...

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Default Properties for Custom Controls...

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:55 am

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

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Default Properties for Custom Controls...

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:55 am

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.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 23 guests