Example: /MacFrameworks/QuickLook/QLPreviewView

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/MacFrameworks/QuickLook/QLPreviewView


Required plugins for this example: MBS MacFrameworks Plugin, MBS MacBase Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacFrameworks/QuickLook/QLPreviewView

This example is the version from Sun, 17th Mar 2012.

Project "QLPreviewView.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control CocoaControlMBS1 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS1 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS n=new QLPreviewViewMBS(0,0,me.Width,me.Height) n.shouldCloseWithWindow = true n.autostarts = True Return n End EventHandler
End Control
Control Listbox1 Inherits Listbox
ControlInstance Listbox1 Inherits Listbox
EventHandler Sub Change() if me.ListIndex>=0 then dim file as FolderItem = me.RowTag(me.ListIndex) // In carbon apps first item is not visible. Second item is Visible. Works fine in Cocoa n.previewItem = file else n.previewItem = nil end if End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
EventHandler Sub Open() if not QLPreviewViewMBS.Available then MsgBox "This example requires Mac OS X 10.6." quit end if dim folder as FolderItem = SpecialFolder.Pictures dim c as integer = folder.Count for i as integer = 1 to c dim file as FolderItem = folder.TrueItem(i) if file<>nil and file.Directory = false then Listbox1.AddRow file.DisplayName Listbox1.RowTag(listbox1.LastIndex) = file end if next End EventHandler
Property n As QLPreviewViewMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

See also:

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


💬 Ask a question or report a problem