Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Icon.SetIcon
Sets the icon for the file or directory at the specified path.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
QuickLook Files | 2.7 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |
MBS( "Icon.SetIcon"; Path; image ) More
Parameters
Parameter | Description | Example |
---|---|---|
Path | The path to the file or folder. | "/Applications" |
image | A container value with some picture. Can be JPEG, GIF, BMP, PNG or TIFF. | $image |
Result
Returns OK on success.
Description
Sets the icon for the file or directory at the specified path.See also App.SetDockIcon to change the app icon.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Examples
Sets icon of a file on the desktop:
MBS("Icon.SetIcon"; "/Users/Christian/Desktop/test.pdf"; Data::image)
See also
Release notes
- Version 11.3
- Changed Icon.GetIcon, Icon.SetIcon and Icon.GetIconWithQuickLook functions to better handle memory management on macOS.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 11.3pr5
- MBS Filemaker Plugin 2.7 Release notes
- MBS Filemaker Plugin, version 2.7pr8
This function checks for a license.
Created 18th August 2014, last changed 13th November 2023