Rank: Member
Groups: Guest
Joined: 2/23/2008(UTC) Posts: 10
|
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: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
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);
}
}
Edited by user Sunday, March 30, 2008 5:52:17 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 2/23/2008(UTC) Posts: 10
|
Thanks for all your effort there Alex. I'll give it a try and let you know how it goes.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hi, Do you have any progress with the issue? |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 2/23/2008(UTC) Posts: 10
|
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: Guest
Joined: 2/23/2008(UTC) Posts: 10
|
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: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
OK, feel free to post here any thoughts or questions. |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.