Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacBase/NSFont fonts
Function:
Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacBase/NSFont fonts
This example is the version from Sun, 17th Mar 2012.
Project "NSFont fonts.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Listbox1 Inherits Listbox
ControlInstance Listbox1 Inherits Listbox
EventHandler Sub ExpandRow(row As Integer) dim fontFamily as string = me.Cell(row,0) dim fonts() as variant = m.availableMembersOfFontFamily(fontFamily) for each f as Variant in fonts dim a() as Variant = f me.AddRow a(0).StringValue next End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Listbox2 Inherits Listbox
ControlInstance Listbox2 Inherits Listbox
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
EventHandler Sub Open() m = new NSFontManagerMBS dim fonts() as string = m.availableFonts dim fontFamilies() as string = m.availableFontFamilies for each f as string in fonts listbox2.addrow f next for each f as string in fontFamilies Listbox1.Addfolder f next End EventHandler
Property m As NSFontManagerMBS
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 MacBase Plugin.





Links
MBS Xojo Chart Plugins