Example: /ChartDirector/iconameter

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

/ChartDirector/iconameter


Required plugins for this example: MBS ChartDirector Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /ChartDirector/iconameter

This example is the version from Thu, 6th Apr 2016.

Project "iconameter.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class PicWindow Inherits Window
EventHandler Sub Open() // The value to display on the meter const value = 85 // Create an AugularMeter object of size 70 x 90 pixels, using black background // with a 2 pixel 3D depressed border. dim m as new CDAngularMeterMBS(70, 90, 0, 0, -2) // Use white on black color palette for default text and line colors m.setwhiteonblackColors // Set the meter center at (10, 45), with radius 50 pixels, and span from 135 to // 45 degress m.setMeter(10, 45, 50, 135, 45) // Set meter scale from 0 - 100, with the specified labels dim pattern1(-1) as string = array("E", " ", " ", " ", "F") m.setScale(0, 100, pattern1) // Set the angular arc and major tick width to 2 pixels m.setLineWidth(2, 2) // Add a red zone at 0 - 15 m.addZone(0, 15, &hff3333) // Add an icon at (25, 35) call m.addText(25, 35, "<*img="+m.getpath(FindFile("gas.gif"))+"*>") // Add a yellow (ffff00) pointer at the specified value call m.addPointer(value, &hffff00) // Output the chart Backdrop=m.makeChartPicture End EventHandler
Function FindFile(name as string) As FolderItem // Look for file in parent folders from executable on dim parent as FolderItem = app.ExecutableFile.Parent while parent<>Nil dim file as FolderItem = parent.Child(name) if file<>Nil and file.Exists then Return file end if parent = parent.Parent wend End Function
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

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


💬 Ask a question or report a problem