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
mikro  
#1 Posted : Thursday, September 25, 2008 1:35:34 AM(UTC)
mikro

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?

Dmitry  
#2 Posted : Friday, October 3, 2008 7:29:48 PM(UTC)
Dmitry

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:

  1. Add a clall inherited from ThumbnailListItem.

  2. 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.

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

mzhao  
#3 Posted : Friday, June 28, 2013 8:43:58 AM(UTC)
mzhao

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.

vitaly  
#4 Posted : Friday, June 28, 2013 11:52:18 PM(UTC)
vitaly

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

mzhao  
#5 Posted : Monday, July 1, 2013 4:50:58 AM(UTC)
mzhao

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.

vitaly  
#6 Posted : Monday, July 1, 2013 8:38:08 PM(UTC)
vitaly

Rank: Advanced Member

Groups: Guest
Joined: 12/19/2012(UTC)
Posts: 164

Was thanked: 8 time(s) in 8 post(s)
Hello,

Unfortunately, we does not have any samples how to customize tooltip.

However I found the topic:

http://stackoverflow.com...e-custom-tooltip-c-sharp

There is an answer how to create custom tooltip in c#.

Best regards,

Vitaly Kustov

Aurigma Technical Support

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