Rank: Member
Groups: Guest
Joined: 11/6/2006(UTC) Posts: 10
|
1) If my control resizes, it does not seem to add/delete columns as needed based on the new size... I have to readd the items to change the number of columns displayed. Is there any way to make it recalculate the columns based on current size of control? 2) What I would like to be able to do is customize the look of the thumbs, such as adding frames around them or possibly adding a shadow... 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, As for your first question - which view mode do you use? If you use View.Icons or View.Thumbnails mode, try to set AutoArrange property of the ThumbnailListView to true. Regarding to your second question - you have two possible ways. First - inherit from Aurigma.GraphicsMill.WinControls.ThumbnailListItem class and overload OnThumbnailLoaded method. You can add any additional image processing in your implementation. Second way is to use methods of the image list to obtain already loaded images and change them. Here small code sample which illustrates the first approach. List item class code: Code:private class BorderThumbItem: Aurigma.GraphicsMill.WinControls.ThumbnailListItem
{
public BorderThumbItem(Aurigma.GraphicsMill.WinControls.Pidl pidl)
: base(pidl)
{
}
protected override void OnThumbnailLoaded(Aurigma.GraphicsMill.Bitmap loadedThumbnail)
{
float frameWidth = System.Math.Min(loadedThumbnail.Width, loadedThumbnail.Height) / 5;
loadedThumbnail.Transforms.Spray(30, frameWidth, Aurigma.GraphicsMill.Transforms.FadeType.Linear, 100, Aurigma.GraphicsMill.RgbColor.Red);
base.OnThumbnailLoaded (loadedThumbnail);
}
}
And small example of usage: Code:Aurigma.GraphicsMill.WinControls.Pidl pidl = Aurigma.GraphicsMill.WinControls.Pidl.Create(@"D:\Pictures\Sights\Москва - шоу на смотровой\");
Aurigma.GraphicsMill.WinControls.Pidl[] items = pidl.Items;
foreach (Aurigma.GraphicsMill.WinControls.Pidl item in items)
{
thumbnailListView1.Items.Add(new BorderThumbItem(item));
}
The attached screenshot shows what it looks like. Edited by user Tuesday, December 18, 2007 8:20:55 PM(UTC)
| Reason: Not specified Alex Kon attached the following image(s): |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 11/6/2006(UTC) Posts: 10
|
Hi, Thanks for the answers. AutoArrange appears to be working. I guess I misunderstood its functionality when I read the doc. As for the second question, I wrote this in VB.NET: Code:Public Class BorderThumbItem
Inherits Aurigma.GraphicsMill.WinControls.ThumbnailListItem
Public Sub New(ByVal filePath As String)
MyBase.New(filePath)
End Sub
Protected Overrides Sub OnThumbnailLoaded(ByVal loadedThumbnail As Aurigma.GraphicsMill.Bitmap)
Dim frameWidth As Single = (System.Math.Min(loadedThumbnail.Width, loadedThumbnail.Height) / 5)
loadedThumbnail.Transforms.Spray(30, frameWidth, Aurigma.GraphicsMill.Transforms.FadeType.Linear, 100, Aurigma.GraphicsMill.RgbColor.Red)
MyBase.OnThumbnailLoaded(loadedThumbnail)
End Sub
End Class
However, Intellisense is telling me that there is no such Overridable method? "sub 'OnThumbnailLoaded' cannot be declared 'Overrides' because it does not override a sub in a base class." Edited by user Tuesday, December 18, 2007 8:21:24 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Ups... It seems that the posted code sample is based on the new changes which have been made after release. These changes will be availavle with new release. |
|
|
|
|
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.