Over the 2005-2006 holiday season, I got a kick out of developing some C# controls. I had more time to fix them up a bit, stick them in a DLL and demo project. I plan on extending them.
Output Window and Color Combobox Control
The Output Window is a simple control that basially inherits from RichEditBox. I got the idea from Visual Make tool.
The control has like three main member functions/properties: OutputText(string), OutputText(string, Color), and TextColor.
The color combobox shows all the known colors and allows the user to see the color selected as well as the name. Setting the DropDownStyle to ComboBoxStyle.DropDownList allows for the neat display, else it will just show the selected text.
The demo dialog lets you see how the controls are used.
ImageListBox and ImageCombobox
This demos the ability to show images in the listitem. The controls use a DataTable to store the image and text. Future versions should allow an ItemData field which would not be visible. It would also be easy to do multiple columns.
On the Combobox, notice the DropDownStyle.
This is a simple UpDown control I threw in with the intention of using it for future controls.
The Picklist uses two ImageList controls above. The demo shows that multiple copies of the same image can be added. This and the fact the images are physically moved from one listbox to the other may be a huge performance issue. Re redesign where the images are maintained in a single ImageList would be better. For my purposes, this implementation works well.
See my site for a listing of controls and the code. I wanted to get the code out so others can use them, extend them, and pass them on. The initial design used a ImageList to store the images and the table for the key and text. I didn't like that design because (as shown in the demo) I wanted to be able to pass the DataTable to other controls.
To include the control with out building a library DLL, just include the file, for example, ImageListBox.cs to the project. Compiling it will temporarily add the control to the toolbox so it can be dragged and dropped onto the form. <o:p>
Eventually, I want to make a multi-column combobox/listbox. The way the ImageComboBox is designed (using the DataSet) it seems fairly easy to extend. I'm sure there are easier or better ways.. that is why I submit the code to the gurus of the world. Someone out there can use all this I'm sure. And for others? They can use it to go on to better controls. <o:p>
Anyway, I also want to extend the library into a more robust one. Unfortunately I have more interests than time permits. <o:p>