Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Tools/CUPS/CUPS Jobs List
Function:
Required plugins for this example: MBS Tools Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Tools/CUPS/CUPS Jobs List
This example is the version from Sun, 17th Mar 2012.
Project "CUPS Jobs List.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PrinterPopup Inherits PopupMenu
ControlInstance PrinterPopup Inherits PopupMenu
EventHandler Sub Change() update End EventHandler
EventHandler Sub Open() me.DeleteAllRows me.AddRow "All" me.AddSeparator dim p(-1) as CUPSDestinationMBS = CUPSMBS.GetDestinations for each d as CUPSDestinationMBS in p me.AddRow d.Name next me.ListIndex=0 End EventHandler
End Control
Control CheckBox1 Inherits CheckBox
ControlInstance CheckBox1 Inherits CheckBox
EventHandler Sub Action() update End EventHandler
End Control
Control PopupWhich Inherits PopupMenu
ControlInstance PopupWhich Inherits PopupMenu
EventHandler Sub Change() update End EventHandler
EventHandler Sub Open() me.AddRow "All Jobs" me.AddRow "Active Jobs" me.AddRow "Complete Jobs" me.ListIndex=0 End EventHandler
End Control
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Sub update() List.DeleteAllRows if PrinterPopup.ListIndex<0 then Return if PopupWhich.ListIndex<0 then Return dim name as string if PrinterPopup.ListIndex>=2 then name=PrinterPopup.text end if dim OnlyMyJobs as Boolean = CheckBox1.Value dim whichJobs as integer = PopupWhich.ListIndex-1 dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(name, OnlyMyJobs, whichJobs) for each j as CUPSJobMBS in jobs List.AddRow j.Title next End Sub
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 Tools Plugin.





Links
MBS Xojo PDF Plugins