FolderItem.ExtensionVisible

From Xojo Documentation

Revision as of 15:40, 12 November 2019 by PLefebvre (talk | contribs) (Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Property (As Boolean )
aFolderItem.ExtensionVisible = newBooleanValue
or
BooleanValue = aFolderItem.ExtensionVisible

Supported for all project types and targets.

Allows you to tell whether a given file has its file extension hidden or visible, or toggles that status.

Notes

Note that when you change this setting, the operating system's Desktop Manager or subsequent Navigation dialogs may not reflect the change right away. When you create a new file under macOS, the "hide extension" flag is set according to the current value of this property. On Windows, hiding the file extension is a global property, so if it is true for one FolderItem on the user's computer it is true for all of them.

Examples

This code checks the ExtensionVisible flag for a file.

Var f As FolderItem = SpecialFolder.Desktop.Child("MyDocument.txt")
If f.ExtensionVisible Then
MessageBox("The extension is visible!")
Else
MessageBox("The extension is not visible!")
End If