Microsoft provides us with a simple example custom property builder in the zoombldr.aspx file located below the 60 hive in C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\[LCID] where LCID equals 1033 for English - United States installations. Zoombldr.aspx is displayed by clicking the small button that appears to the right of a text property in a web part's toolpart:
To use our own custom builder, we start by decorating the web part custom property in question with the HtmlDesignerAttribute as shown below:
The BrowserBuildertype.Dynamic parameter of the HtmlDesignerAttribute also requires us to override the GetCustomerBuilder method of Microsoft.SharePoint.WebPartPages.WebPart in our web part class:
Finally, here's an example of a custom property builder in action:
There seems to be very little doumentation on the HtmlDesignerAttribute, and Googling for 'HtmlDesignerAtribute' produces only a few results, of which only one or two are actually useful. There's also an interesting BuilderArguments parameter to the HtmlDesignerAttribute that I'm not even sure what does! The docs say that BuilderArguments "Contains the arguments that are passed to the custom builder" but nothing appears to be passed into the window.dialogArguments object from this parameter (any ideas?).
This article has skimmed over a lot of the details, assuming that you have some experience in developing custom web parts. For further study, I'd recommend starting off by dissecting the zoombldr.aspx file and experimenting a bit on your own. If you'd like to to learn more about developing web parts and other solutions for Windows SharePoint Service and SharePoint Portal Server 2003, please consider attending one of our developer classes.