This documentation is for the old version. Go to the latest Graphics Mill docs

ThumbnailListItem.GetText Method

Returns the specified text information of the item.

Namespace: Aurigma.GraphicsMill.WinControls
Assembly: Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)

Syntax

Visual Basic
Public Overrides Function GetText ( _
	textInfoId As Integer _
) As String
C#
public override string GetText(
	int textInfoId
)

Parameters

textInfoId

Type: System.Int32

An integer value identifying the type of requested text information.

Return Value

A string containing requested text information of the item. If the item has no text of specified type, it returns the empty string.

Remarks

ThumbnailListItem class provides access to the following pieces of text information:

Constant Description
TextInfoIdCreationDate File creation date.
TextInfoIdDisplayName Display name of the item (its file name without path with or without extention depending on Windows settings).
TextInfoIdFileSize File size.
TextInfoIdFileType File type name (as registered in Windows).
TextInfoIdPath Full path to the file.
Note

Do not overload this method to change (concatenate) strings. There are two reasons for that:

  1. This method is performed aynchronously, that is when this method is called for the first time, it returns null and start the load of the text string. After the string is loaded, the TextChanged event is raised, and only then the null value is replaced with the new string.
  2. This method is called every time the control needs to repaint the item, or when it by any other reason needs to know that text string. So if you overload it for concatenating string (for example, adding prefixes), every time the list item is repainted, a new concatenation will be performed.

The solution is to overload the OnTextChanged(Int32) method.

See Also

Reference