Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

Required plugins for this example: MBS MacOSX Plugin, MBS Win Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/Paths
This example is the version from Fri, 25th Jun 2015.
Project "Paths.rbp"
Filetype special/any
End FileTypes
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() dim f as folderItem f=getopenFolderItem("special/any") if f<>Nil then run f end if End EventHandler
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control StaticText5 Inherits Label
ControlInstance StaticText5 Inherits Label
End Control
Control filename Inherits Label
ControlInstance filename Inherits Label
End Control
Control displayname Inherits Label
ControlInstance displayname Inherits Label
End Control
Control absolutepath Inherits Label
ControlInstance absolutepath Inherits Label
End Control
Control longpath Inherits Label
ControlInstance longpath Inherits Label
End Control
Control shortpath Inherits Label
ControlInstance shortpath Inherits Label
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control unixpath Inherits Label
ControlInstance unixpath Inherits Label
End Control
EventHandler Sub DropObject(obj As DragItem, action As Integer) do if obj.folderItemavailable then run obj.folderItem end if loop until not obj.nextItem End EventHandler
EventHandler Sub Open() me.acceptfileDrop "special/any" End EventHandler
Sub run(f as folderItem) filename.text=f.name displayname.text=f.displayName absolutepath.text=f.absolutePath longpath.text=f.LongPathMBS // in Win plugin shortpath.text=f.ShortPathMBS unixpath.text=f.UnixpathMBS End Sub
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

Feedback, Comments & Corrections

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

MBS Xojo PDF Plugins