Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS Tools Plugin, MBS Util Plugin
Last modified Mon, 15th Mar 2026.
You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /Tools/Tidy/Tidy Options
Download this example: Tidy Options.zip
Project "Tidy Options.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open()
dim doc as new TidyDocumentMBS
dim it as TidyIteratorMBS=doc.OptionList
dim o as TidyOptionMBS = doc.NextOption(it)
while o<>Nil
dim c,t as string
Select case o.Type
case TidyOptionTypeMBS.TidyBoolean
t=" = Bool"
case TidyOptionTypeMBS.TidyInteger
t=" = Integer"
case TidyOptionTypeMBS.TidyString
t=" = String"
else
t=""
end Select
Select case o.Category
case TidyConfigCategoryMBS.TidyDiagnostics
c=" = Diagnostics"
case TidyConfigCategoryMBS.TidyEncoding
c=" = Encoding"
case TidyConfigCategoryMBS.TidyMarkupCleanup
c=" = MarkupCleanup"
Case TidyConfigCategoryMBS.TidyMarkupEntities
c=" = MarkupEntities"
Case TidyConfigCategoryMBS.TidyMarkupRepair
c=" = MarkupRepair"
Case TidyConfigCategoryMBS.TidyMarkupTeach
c=" = MarkupTeach"
Case TidyConfigCategoryMBS.TidyMarkupXForm
c=" = MarkupXForm"
case TidyConfigCategoryMBS.TidyDocumentIO
c=" = DocumentIO"
Case TidyConfigCategoryMBS.TidyFileIO
c=" = FileIO"
case TidyConfigCategoryMBS.TidyPrettyPrint
c=" = PrettyPrint"
else
c=""
end Select
List.AddRow ""
List.Cell(List.LastIndex,0) = str(o.Category)+c
Select case o.Type
case TidyOptionTypeMBS.TidyBoolean
List.Cell(List.LastIndex,1) = str(o.DefaultBoolean)
case TidyOptionTypeMBS.TidyInteger
List.Cell(List.LastIndex,1) = str(o.DefaultInteger)
case TidyOptionTypeMBS.TidyString
List.Cell(List.LastIndex,1) = o.DefaultString
end Select
List.Cell(List.LastIndex,2) = DecodingFromHTMLMBS(o.Description)
List.Cell(List.LastIndex,3) = str(o.ID)
List.Cell(List.LastIndex,4) = str(o.IsReadOnly)
List.Cell(List.LastIndex,5) = o.Name
List.Cell(List.LastIndex,6) = str(o.Type)+t
o = doc.NextOption(it)
wend
End EventHandler
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
Sign
End Sign
End Project
See also:
Download this example: Tidy Options.zip
The items on this page are in the following plugins: MBS Tools Plugin.