Platforms to show: All Mac Windows Linux Cross-Platform
/MacFrameworks/Cocoa Controls/ProgressIndicator
Required plugins for this example: MBS MacFrameworks Plugin, MBS MacBase 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: /MacFrameworks/Cocoa Controls/ProgressIndicator
This example is the version from Sun, 17th Mar 2012.
Project "ProgressIndicator.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
n1=new NSProgressIndicatorMBS(0,0,me.Width-20,me.Height)
Return n1
End EventHandler
End Control
Control CocoaControlMBS2 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS2 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS
n2=new NSProgressIndicatorMBS(0,0,me.Width-20,me.Height)
n2.startAnimation
Return n2
End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control CocoaControlMBS3 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS3 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS
n3=new NSProgressIndicatorMBS(0,0,me.Width-20,me.Height)
n3.minValue=0
n3.maxValue=100
n3.doubleValue=50
n3.isIndeterminate=false
Return n3
End EventHandler
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control CocoaControlMBS5 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS5 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS
n5=new NSProgressIndicatorMBS(0,0,me.Width-20,me.Height)
n5.style=n5.NSProgressIndicatorSpinningStyle
Return n5
End EventHandler
End Control
Control CocoaControlMBS6 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS6 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS
dim n as new NSProgressIndicatorMBS(0,0,me.Width-20,me.Height)
n.style=n.NSProgressIndicatorSpinningStyle
n.startAnimation
Return n
End EventHandler
End Control
EventHandler Sub Open()
if not CocoaControlMBS1.Available then
MsgBox "This example requires Mac OS X 10.5."
quit
end if
End EventHandler
Property n1 As NSProgressIndicatorMBS
Property n2 As NSProgressIndicatorMBS
Property n3 As NSProgressIndicatorMBS
Property n4 As NSProgressIndicatorMBS
Property n5 As NSProgressIndicatorMBS
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:
- /MacFrameworks/Cocoa Controls/Cocoa Controls
- /MacFrameworks/Cocoa Controls/Custom NSView
- /MacFrameworks/Cocoa Controls/NSButton test
- /MacFrameworks/Cocoa Controls/NSProgressIndicator
- /MacFrameworks/Cocoa Controls/SearchField with menu
- /MacFrameworks/Cocoa Controls/SecureTextField
- /MacFrameworks/Cocoa Controls/SliderView
- /MacFrameworks/Cocoa Controls/TableView with scrollbars
- /MacFrameworks/Cocoa Controls/TextView
- /MacFrameworks/Cocoa Controls/TextView with events
The items on this page are in the following plugins: MBS MacFrameworks Plugin.