in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

images in ImageListBoxControl when using DataSource

Last post 9/24/2007 12:10 PM by Brendon Muck. 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 9/24/2007 3:28 AM

    images in ImageListBoxControl when using DataSource

    hi,

    How would I set an image to an item in an ImageListBoxControl, if the items are set by the DataSource property? I also need to handle the ItemDraw event, because I need to set some items to bold, and some to a different color, so this should be somehow combined.

  • 9/24/2007 12:10 PM In reply to

    Re: images in ImageListBoxControl when using DataSource

     This can all be done from within the DrawItem event of the control. I've never drawn an image to the control before, but I'd imagine that you could with e.Graphics.DrawImage().

    In terms of showing some items in bold or plain, you can just create a conditional statement around the e.Graphics.DrawString() method to show some items in bold. I actually spent the time putting together an example for you, but it appears that the web server ate my post. If you still need an example, please let me know. 

    http://www.logisticdynamics.com
Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED