Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCloud/Popover window
Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCloud/Popover window
This example is the version from Sun, 17th Mar 2012.
Project "Popover window.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control BevelButton1 Inherits BevelButton
ControlInstance BevelButton1 Inherits BevelButton
EventHandler Sub Action() if TargetCocoa = false then MsgBox "This example is only for Cocoa target." end if if NSPopoverMBS.available = false then MsgBox "Please update to Mac OS X 10.7 (Lion)" Return end if if pw<>nil then pw.performClose pw = nil vc = nil else dim tv as new NSTextFieldMBS(10,10, 180, 50) tv.StringValue = "Hello World" tv.Editable = false tv.textColor = NSColorMBS.whiteColor tv.drawsBackground = false 'tv.backgroundColor = NSColorMBS.blackColor tv.Bordered = false dim vv as new NSViewMBS(0,0,200,70) vv.addSubview tv vc = new NSViewControllerMBS vc.view = vv pw = new NSPopoverMBS pw.animates = true pw.contentViewController = vc pw.behavior = pw.NSPopoverBehaviorSemitransient pw.appearance = pw.NSPopoverAppearanceHUD dim v as NSViewMBS = me.NSViewMBS dim r as NSRectMBS = v.bounds pw.showRelativeToRect(r, v, pw.MaxXEdge) end if End EventHandler
End Control
Property pw As NSPopoverMBS
Property vc As NSViewControllerMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

Feedback, Comments & Corrections

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

MBS FileMaker Plugins