Rank: Newbie
Groups: Member
Joined: 3/11/2011(UTC) Posts: 3
Thanks: 1 times
|
Hi
I am having trouble with a "ThumbnailListView" windows control on a window form.
I can add the control, load it with thumbnails and all is well until I call up the dialog again and the thumbnails disappear. They are still in the list because the items.count is what I would expect.
Basically I have a main form and I have a dialog form which is created and never disposed. The dialog form has the thumbnaillistview control and is populated with thumbnails only once to increase performance.
The main form uses the showdialog method to show the dialog form and all is well for the first time but the second time the thumbnail items disappear.
If I change the showdialog to show it works fine.
Any ideas ?
Many thanks in advance.
Regards
Paul.
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello Paul,
Could you please provide me with complete sample application so that I can check it locally? If it is not possible, please share the code snippet you use with me.
Looking forward to reply from you. |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 3/11/2011(UTC) Posts: 3
Thanks: 1 times
|
Hi Dmitry I have attached a sample project which demonstrates my problem. You will need to correct the image paths within the load of the main form. What you should find is that when you call up the thumbnail form the first time the thumbnail images are displayed and the second time they disappear. If you examine the items.count property you will see that the image count is correct. If you change the ".showdialog" method to ".show" then it works fine. Regards Paul. Edited by user Sunday, March 13, 2011 4:00:10 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello Paul,
Thank you for the sample application and additional info.
Showdialog method is used to show form as a modal dialog box. Show method is used to show modeless windows. Showdialog does not call the Dispose method automatically on its close, and data can be retrieved from the modal form. However, Show disposes upon close, and when you click button to show thumbnails, they are loaded anew.
It is a bug of ThumbnailListView control that thumbnails cannot be loaded from the modal form next times. I posted it to our bug tracker. Our developers will work on this problem. |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
![thanks](/Themes/aurigma/heart_small.png) 1 user thanked Dmitry.Obukhov for this useful post.
|
|
|
Rank: Newbie
Groups: Member
Joined: 3/11/2011(UTC) Posts: 3
Thanks: 1 times
|
Hi Dmitry
Thanks for your reply. I thought it may be something to do with Modal because if the dialog is disposed then it works fine.
Is there a work-around for this in the short term ? I need the form to be Modal (.showdialog) but I want to avoid loading the thumbnails each time.
I did find a way round it by declaring the thumbnailview and it's thumbnails in the mainform once only and passing it as a parameter each time to the dialog form but that's not ideal.
Regards
Paul.
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Quote: Is there a work-around for this in the short term ? I need the form to be Modal (.showdialog) but I want to avoid loading the thumbnails each time. Unfortunately, there is no workaround. Quote: I did find a way round it by declaring the thumbnailview and it's thumbnails in the mainform once only and passing it as a parameter each time to the dialog form but that's not ideal. I assume it is okay to use in short term. |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
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.