Platforms to show: All Mac Windows Linux Cross-Platform

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/linearzonemeter
This example is the version from Sun, 17th Mar 2012.
Project "linearzonemeter.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 LinearMeter object of size 210 x 45 pixels, using silver background // with a 2 pixel black 3D depressed border. dim m as new CDLinearMeterMBS(210, 45, CDBaseChartMBS.silverColor, 0, -2) // Set the scale region top-left corner at (5, 5), with size of 200 x 20 pixels. // The scale labels are located on the bottom (implies horizontal meter) m.setMeter(5, 5, 200, 20, CDBaseChartMBS.kBottom) // Set meter scale from 0 - 100 m.setScale(0, 100) // Add a title at the bottom of the meter with a 1 pixel raised 3D border m.addTitle(CDBaseChartMBS.kBottom, "Battery Level", "arialbd.ttf", 8).setBackground(CDBaseChartMBS.kTransparent, -1, 1) // Set 3 zones of different colors to represent Good/Weak/Bad data ranges call m.addZone(50, 100, &h99ff99, "Good") call m.addZone(20, 50, &hffff66, "Weak") call m.addZone(0, 20, &hffcccc, "Bad") // Add empty labels (just need the ticks) at 0/20/50/80 as separators for zones m.addLabel(0, " ") m.addLabel(20, " ") m.addLabel(50, " ") m.addLabel(100, " ") // Add a semi-transparent blue (800000ff) pointer at the specified value, using // triangular pointer shape call m.addPointer(value, &h800000FF).setShape(CDBaseChartMBS.kTriangularPointer) // Output the chart Backdrop=m.makeChartPicture End EventHandler
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

Feedback, Comments & Corrections

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

The biggest plugin in space...

MBS Xojo Chart Plugins

Start Chat