Geeks With Blogs
Andy Johns' Blog Andy's twisted brain.... March 2005 Entries
OwnerDrawn listboxes and DataSource - too many bad code examples....
I've seen a lot of examples out in the ether for OwnerDrawn listboxes and comboboxes that do something like: private void mylistbox_DrawItem(object sender, DrawItemEventArgs e){ e.DrawBackground(); DataRowView rv = (DataRowView) mylistbox.Items[e.Index]; string textToDisplay = rv[mylistbox.DisplayMember]... e.Graphics.DrawString(textT... e.Font, new SolidBrush(e.ForeColor), e.Bounds.Location); e.DrawFocusRectangle();} While there are several problems with this little example the one ......

Posted On Tuesday, March 22, 2005 2:17 PM

Copyright © Andy Johns | Powered by: GeeksWithBlogs.net