FontComboBox and FontManager
Version 1.1
April 2007
C#
.NET 2.0
open source
This library contains 3 .NET 2.0 components for managing and displaying fonts.
All sources and a fully implemented demo application are provided. |
Class diagram:
All components are provided with the necessary design-time features (attributes like ToolBoxBitmap, Category, Description and Localizable, derived ExpandableObjectConverter class with Reflection, ...) Of course you can set all properties and methods in code.
C# example:
private void InitializeFontComboManager()
{
fontComboBox1.FontItemDrawEngine = new ScipBe.Controls.ModernFontItemDrawEngine();
(fontComboBox1.FontItemDrawEngine as ScipBe.Controls.ModernFontItemDrawEngine)
.PangramText = "The quick brown fox jumps over the lazy dog";
fontComboBox1.OptionsView.ShowInstalledFonts = true;
fontComboBox1.OptionsView.ShowRecentlyUsedFonts = true;
fontComboBox1.OptionsView.ShowSymbolFonts = true;
fontComboBox1.OptionsBehavior.AddSelectedFontToRecentlyUsed = true;
fontManager1.RecentlyUsedFontsTitle = "Recently used fonts";
fontManager1.ThemeFontsTitle = "Theme fonts";
fontManager1.InstalledFontsTitle = 'Installed Windows fonts";
fontManager1.RecentlyUsedFontItems.Add("Arial");
fontManager1.ThemeFontItems.Add("Calibri", "body");
}
private void buttonShowFont_Click(object sender, EventArgs e)
{
if (fontComboBox1.SelectedItem != null)
MessageBox.Show(fontComboBox1.SelectedItem.ToString()
+ ' ' + (fontComboBox1.SelectedItem as ScipBe.Controls.FontItem)
.TextMetrics.PanoseFamilyType.ToString());
}
Copyrights and distribution
- These components are open source (Mozilla Public License 1.1) and may be freely distributed.
- The author doesn't give a warranty for error free running of these components and he doesn't give any support.
- See source code for history and more information about the classes, interfaces, properties, methods, events, ...
Download
FontComboBox and FontManager components
- Contents: Components and demo program with sources (C#, .NET 2.0, Visual Studio 2005)
- Version: 1.1 (2007-07-04)
- File size: 127.03 Kb
- Author: Stefan Cruysberghs