DrawIcon vs DrawImage

J

Jon Slaughter

I'm manually displaying images in a TreeView but when I stick the images in
the Images(icons) container in the TreeView and use DrawImage they look like
crap but when I force an icon draw and use DrawIcon they look much better.
Its suppose to be the same Image but when I store it in the image list
something seems to be happening.

The icon is a 48x48 pixel icon(I did have the multi resolutions of it but I
thought it might have been choosing the 16x16 so I removed them) and when I
use it with the DrawIcon as DrawIcon(Resources.Icons.MyIcon, ...).

With DrawImage I use
DrawImage(e.Node.TreeView.ImageList.Images[e.Node.ImageIndex], ...).

I do set anti-aliasing mode and stuff but I get no where near the quality of
other lists.

Only think I can think of is that the TreeView modifies the icons when I add
them ;/ If this is true is there any way to stop this? Its bad enough that I
have to do all the drawing manually just because they forgot to allow
checked boxes only on some nodes ;/ Now I can't get it to look good like it
is in windows explorer or others ;/

Thanks,
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top