|
|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 10 Points: 30
|
I notice there is no ownerdraw property on the thumbnail listview control.
I need to display a list of jpeg files, as thumbnails and the thumbnail control is working beautifully - nice and fast and easy to use.
However I need to overlay the thumbnail with some small icons depending on certain attributes of those jpegs. Is this possible?
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 376 Points: 373
|
Hello, Unfortunately our control has no owner-draw mode. So the only way I can suggest is to draw necessary icons directly on the thumbnail. You may handle IconChanged event and modify thumbnails as you wish. Here is small code sample to illustrate the idea: Somewhere in initialization method: Code:
_tl.Items.IconChanged += new
Aurigma.GraphicsMill.WinControls.IconChangedEventHandler(Items_IconChanged);
And this is event handler implementation: Code:
void Items_IconChanged(object sender,
Aurigma.GraphicsMill.WinControls.IconChangedEventArgs e)
{
if (e.View == Aurigma.GraphicsMill.WinControls.View.Thumbnails)
{
object itemImageKey = e.Item.GetIconKey(e.View);
Aurigma.GraphicsMill.WinControls.IImageList thumbnailsList =
_tl.GetImageList(e.View);
Aurigma.GraphicsMill.Bitmap bmp =
thumbnailsList.GetImage(itemImageKey);
using (System.Drawing.Graphics g = bmp.GetGdiplusGraphics())
g.FillRectangle(System.Drawing.Brushes.Red, 10, 10, 10, 10);
thumbnailsList.SetImage(bmp, itemImageKey);
}
}
Best wishes, Alex.
|
|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 10 Points: 30
|
Thanks for all your effort there Alex.
I'll give it a try and let you know how it goes.
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 376 Points: 373
|
Hi,
Do you have any progress with the issue?
Best wishes, Alex.
|
|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 10 Points: 30
|
Well...no. I have decided to stick with the image list I had - adapted myself from a control on www.codeproject.com. It already does what I need and I have a deadline now. Thankyou. Some time in the future I will try again with GraphicsMill Image List. I have purchase Graphicsmill anyway, as the IPTC and EXIF data editing functionality is great! I am also using the Bitmap viewer. Thanks again for your efforts.
|
|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 10 Points: 30
|
Turns out I'll be revisiting this Painting issue in the next week or so. I'll let you know how I get on.
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 376 Points: 373
|
OK, feel free to post here any thoughts or questions.
Best wishes, Alex.
|
|
|
Guest |