This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

FILELIST VIEWER

Dear Alex,


i m using filelist viewer to display the image from a folder,but i want to display the image name without it extension.



thanx

san

Attachments

Hello San,

Whether the control will display extension or not depends on the system options (FolderOptions->View->Hide extensions for known files). So, if you want always hide extension you should change behaviour of the ThumbnailListItem class. It will be something like this:
public class CustomThumbItem: Aurigma.GraphicsMill.WinControls.ThumbnailListItem
{
     public CustomThumbItem(string path)
           : base(path)
     {
     }
	
     public override string GetText(int textInfoId)
     {
         string result = base.GetText(textInfoId);
			
         if (textInfoId == Aurigma.GraphicsMill.WinControls.ThumbnailListItem.TextInfoIdDisplayName)
         {
             int dotIndex = result.LastIndexOf('.');
             if (dotIndex != -1)
                  result = result.Substring(0, dotIndex);
         }
			
         return result;
     }
}