Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.QuickLookMBS(MaxWidth as Integer = 500, MaxHeight as Integer = 500, IconMode as Boolean = false, ScaleFactor as Double = 1.0) as picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method QuickLook MBS MacFrameworks Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a thumbnail for the designated file.
Example
dim f as FolderItem

f=SpecialFolder.Desktop.Child("test.jpg")

// shows the icon in 128x128 scaled by factor 4:
Backdrop=f.QuickLookMBS(128,128,true,4)

// shows the icon in default size:
Backdrop=f.QuickLookMBS(128,128,true,0)

// shows preview of image in 128x128 pixels.
Backdrop=f.QuickLookMBS(128,128,false,0)

// shows preview of image in 512x512 pixels.
Backdrop=f.QuickLookMBS(128,128,false,4)

// shows preview of image in 512x512 pixels.
Backdrop=f.QuickLookMBS(512,512,false,0)

// use Icon function in case no preview is available:
Backdrop=f.iconmbs(512)

Returns nil if Quick Look does not support this file type. In that case you may use folderitem.Icon() with the given size.

MaxWidth and MacHeight specify the maximum desired size.
If ScaleFactor is bigger than zero, it is used. Else the default value is used.
If IconMode is true, QL will produce an icon (ie a thumbnail and all the icon decor, like shadows, curled corner, etc.).

If you look for a control to show quicklook preview like the finder, please check the QLPreviewPanelMBS window and the QLPreviewViewMBS control.

QuickLook does not provide images for items in special folders like temporary folders.

Some examples using this method:

Blog Entries

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...