This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
shelwig  
#1 Posted : Thursday, March 27, 2008 7:53:17 PM(UTC)
shelwig

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?

Alex Kon  
#2 Posted : Sunday, March 30, 2008 5:51:13 PM(UTC)
Alex Kon

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

shelwig  
#3 Posted : Sunday, March 30, 2008 6:28:29 PM(UTC)
shelwig

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.

Alex Kon  
#4 Posted : Sunday, April 6, 2008 5:37:21 PM(UTC)
Alex Kon

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?

shelwig  
#5 Posted : Wednesday, April 9, 2008 8:11:35 PM(UTC)
shelwig

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.

shelwig  
#6 Posted : Thursday, April 24, 2008 2:19:32 PM(UTC)
shelwig

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.

Alex Kon  
#7 Posted : Monday, April 28, 2008 11:41:01 PM(UTC)
Alex Kon

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.
Users browsing this topic
Guest (3)
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.