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
undead80  
#1 Posted : Saturday, February 9, 2008 10:51:40 AM(UTC)
undead80

Rank: Member

Groups: Guest
Joined: 1/7/2008(UTC)
Posts: 28

Hi,

May I know is there anyway we could let the user drag and drop to rearrange the thumbnail?

Please advice.

Thanks in advance.

Alex Kon  
#2 Posted : Sunday, February 10, 2008 7:27:43 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,

Try to set ThumbnailListView.UseDragToMove property to "true".

undead80  
#3 Posted : Monday, February 11, 2008 9:07:44 AM(UTC)
undead80

Rank: Member

Groups: Guest
Joined: 1/7/2008(UTC)
Posts: 28

Alex Kon wrote:
Hello,

Try to set ThumbnailListView.UseDragToMove property to "true".

Hi,

May I know which event will be fired when the user "dragtomove"?

Please advice.

undead80  
#4 Posted : Monday, February 11, 2008 9:43:12 AM(UTC)
undead80

Rank: Member

Groups: Guest
Joined: 1/7/2008(UTC)
Posts: 28

Alex Kon wrote:
Hello,

Try to set ThumbnailListView.UseDragToMove property to "true".

Hi

Beside that

_thl.Items.Insert(PageIndex, New Aurigma.GraphicsMill.WinControls.ThumbnailListItem(pidl))

When I insert item, seems like it will still appear @ the last item in the list and now following the index.

If I call _thl.Refresh, it seems like doesn't work too.

Alex Kon  
#5 Posted : Wednesday, February 13, 2008 3:43:04 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,

Regarding to the first question - all standart drag-n-drop events will be fired (DragOver, DragEnter, DragDrop).

As for Insert(...) method - there is no obligatory correspondence between index in the ThumbnailListView.Items collection and visual order. Here is method which inserts item into the control and updates thumbnails visual order.

Code:
private void InsertItemToIndex(IListItem item, int index)
{
    if (index < 0 || index > _thumbList.Items.Count)
        throw new ArgumentOutOfRangeException("index");

    _thumbList.Items.Add(item);
    if (index < _thumbList.Items.Count)
    {
        int[] indexes = new int[_thumbList.Items.Count - index - 1];
        for (int k = index, i = 0; k < _thumbList.Items.Count - 1; k++)
               indexes[i++] = k;

       _thumbList.Items.Swap(indexes, _thumbList.Items.Count);
    }
}
undead80  
#6 Posted : Thursday, February 14, 2008 12:14:03 PM(UTC)
undead80

Rank: Member

Groups: Guest
Joined: 1/7/2008(UTC)
Posts: 28

Great !!! The Rearrange code works great !!!

And here is the issue...

We are trying to let the user rearrange the Thumbnail as we mentioned...

But, we do have internal array that keep track of the sequence together with details. Thus, we would like the array to be rearrange while the Thumbnail is being Rearranged. And yet, we would like to prevent the user to rearrange the 1st and the last thumbnail, (means the 1st and last thumbnail position is fix)

We also would like to prevent the Thumbnail being drag outside the Thumbnail Viewer, and also nothing else should be drag into the Thumbnail viewer.

Thanks in advance.

Alex Kon  
#7 Posted : Thursday, February 14, 2008 1:35: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,

As for internal array: the best way I see is to bind all your additional data to IListItems using IListItem.Tag property. Maybe you will be able to get rid of the internal array at all and use ThumbnailListView.Items collection instead.

Regarding to drag-n-drop specific of your application - as you understand, we have no such built-in feature. In your case simple "UseDragToMove" is useless, so you should to re-implement this functionality with additional restrictions for the first/last elements.

You can look at Aurigma.GraphicsMill.WinControls source code (not available in trial version) or at MultFrameTiff demo source code and use them as base point for your implementation.

Users browsing this topic
Guest (3)
Similar Topics
Rearrange Thumbnail Listview (Discussions – Graphics Mill)
by ChingYen 5/12/2008 1:38:19 AM(UTC)
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.