Rank: Newbie
Groups: Guest
Joined: 1/15/2008(UTC) Posts: 4
|
I am using a thumbnaillistview to display a series of images. I would like to add a custom caption below each image instead of the filename. To be more specific, I want to add a counter below each image with the index number for each image as it loads, Ex: 1 of 5, 2 of 5 ... 5 of 5. How do I do this?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, You need to do the following steps: - Add a clall inherited from ThumbnailListItem.
- Override method GetText and return a string you want to display there.
Code:
Public Class CustomThumbnailListItem
Inherits ThumbnailListItem
Public Sub New(ByVal pidl As Pidl)
MyBase.New(pidl)
End Sub
Public Overrides Function GetText(ByVal textId As Integer) As String
Return "Text String"
End Function
...
After that you need to create instances of CustomThumbnailListItem class instead of ThumbnailListItem. |
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/10/2010(UTC) Posts: 57
Thanks: 1 times
|
Hello, But sometimes, not all words in the Text show. How can we do following: 1. always show every word in the text at both situations where the text is wrapped or not wrapped: eg: show "this is the text for caption" instead of "this is the text ..."; 2. Always show tooltips when the mouse is at the text. Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 12/19/2012(UTC) Posts: 164
Was thanked: 8 time(s) in 8 post(s)
|
Hello, 1. This is a behavior by design as the text is displayed in a limited rectangle. If it could display long strings, it would ruin the items layout. 2. You could try to display a custom tooltip by overriding the OnMouseHover/OnMouseLeave methods. |
Best regards, Vitaly Kustov Aurigma Technical Support
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/10/2010(UTC) Posts: 57
Thanks: 1 times
|
Where can we find some sample codes for displaying a custom tooltips in the overriding OnMouseHover/OnMouseLeave methods. Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 12/19/2012(UTC) Posts: 164
Was thanked: 8 time(s) in 8 post(s)
|
|
Best regards, Vitaly Kustov Aurigma Technical Support
|
|
|
|
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.