<$BlogRSDURL$>
My Blog Links
Site Links
Currently Reading
Blogroll
Archives
Tools
  • This page is powered by Blogger. Isn't yours?
  • Weblog Commenting and Trackback by HaloScan.com
  • 2RSS.com :: RSS directory
  • Listed on BlogShares
  • Blog Directory, Find A Blog, Submit A Blog, Search For The Best Blogs

Friday, March 05, 2004

ImageComboBox Sample 

My ImageComboBox sample was just posted on GotDotNet.

The ImageComboBox allows you to associate an ImageList with the control and select which images to attach to a particular item in the list. It also has design-time support, so that you can add items with specific images at that time, as well as being able to do it dynamically at runtime. It supports the different styles of ComboBoxes -- DropDown, DropDownList, and SimpleList.

Items of interest:
  • DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) lets you hide properties that you don't want to support in your control, even if they're in your base class.
  • DesignerSerializationVisibility(DesignerSerializationVisibility.Content) lets you save the contents (a list of items in my case) rather than just the object itself.
  • By creating a type Collection that wraps the ComboBox.ObjectCollection, we can use the CollectionEditor to update the Items list (with specific text and image information) during design time.
  • Here's a link to an earlier blog entry I made about drawing the image with the background color transparent.