Implementing the Syncfusion WinForms FontListBox Control
The Syncfusion FontListBox (Syncfusion.Windows.Forms.Tools.FontListBox) is a ListBox-derived control that automatically populates itself with all fonts installed on the user's system. It supports multiple selection modes, type-to-match auto-complete, horizontal scrollbars, item height control, and Office-style visual themes.
When to Use This Skill
Use this skill when you need to:
- Display a list of installed system fonts — auto-populated on creation
- Allow users to select a font — apply the selected font to labels, text boxes, or other controls
- Configure selection modes — single, multi-simple, or multi-extended selection
- Enable type-to-match auto-complete —
UseAutoComplete
- Apply Office visual styles —
VisualStyle with FontListBoxStyle enum
- Control scrollbar visibility —
HorizontalScrollbar, ScrollAlwaysVisible
- Handle font selection events —
SelectedIndexChanged
Component Overview
| Property |
Type |
Description |
SelectionMode |
SelectionMode |
One, MultiSimple, or MultiExtended |
UseAutoComplete |
bool |
Type-ahead matching within the list |
Sorted |
bool |
Sort font names alphabetically |
ItemHeight |
int |
Height in pixels of each list item |
HorizontalScrollbar |
bool |
Show horizontal scrollbar when items overflow |
HorizontalExtent |
int |
Width (px) of the scrollable area when horizontal scrollbar is on |
ScrollAlwaysVisible |
bool |
Keep scrollbars visible regardless of item count |
VisualStyle |
FontListBoxStyle |
Office/Metro visual theme |
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Assembly references and NuGet package setup
- Adding FontListBox via designer or programmatically
- Auto-population with system fonts
- SelectionMode — None, One, MultiSimple, MultiExtended
- Handling SelectedIndexChanged to apply font to another control
Customization and Behavior
📄 Read: references/customization-and-behavior.md
ItemHeight — row height per font entry
Sorted — alphabetical sorting of font names
UseAutoComplete — type-to-match as user types
HorizontalScrollbar + HorizontalExtent
ScrollAlwaysVisible — force scrollbars always visible
Visual Styles
📄 Read: references/visual-styles.md
VisualStyle property using FontListBoxStyle enum
- Available styles: Default, Metro, Office2016Colorful, Office2016White, Office2016Black, Office2016DarkGray
Quick Start
C#:
using Syncfusion.Windows.Forms.Tools;
FontListBox fontListBox1 = new FontListBox();
fontListBox1.Size = new System.Drawing.Size(160, 94);
fontListBox1.UseAutoComplete = true;
fontListBox1.SelectionMode = System.Windows.Forms.SelectionMode.One;
fontListBox1.SelectedIndexChanged += FontListBox1_SelectedIndexChanged;
this.Controls.Add(fontListBox1);
private void FontListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
label1.Font = new System.Drawing.Font(
fontListBox1.SelectedItem.ToString(), 11, System.Drawing.FontStyle.Regular);
}
VB.NET:
Imports Syncfusion.Windows.Forms.Tools
Dim fontListBox1 As New FontListBox()
fontListBox1.Size = New System.Drawing.Size(160, 94)
fontListBox1.UseAutoComplete = True
fontListBox1.SelectionMode = System.Windows.Forms.SelectionMode.One
AddHandler fontListBox1.SelectedIndexChanged, AddressOf FontListBox1_SelectedIndexChanged
Me.Controls.Add(fontListBox1)
Private Sub FontListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
label1.Font = New System.Drawing.Font(
fontListBox1.SelectedItem.ToString(), 11, System.Drawing.FontStyle.Regular)
End Sub
Common Use Cases
| Scenario |
Properties to Set |
| Font picker for a text editor |
SelectionMode = One, handle SelectedIndexChanged |
| Multi-font selection |
SelectionMode = MultiExtended |
| Fast keyboard navigation |
UseAutoComplete = true |
| Always show scrollbar |
ScrollAlwaysVisible = true |
| Alphabetically sorted list |
Sorted = true |
| Office-style appearance |
VisualStyle = FontListBoxStyle.Office2016Colorful |
1---2name: syncfusion-winforms-fontlistbox3description: Guide for implementing the Syncfusion WinForms FontListBox control in Windows Forms applications. Use this skill when the user needs to display a list of installed system fonts, configure selection modes for font selection, apply visual styles, enable font auto-complete, customize scrollbars, or handle font selection events. Covers UseAutoComplete, FontListBoxStyle, SelectionMode, and scrollbar behavior.4---56# Implementing the Syncfusion WinForms FontListBox Control78The Syncfusion `FontListBox` (`Syncfusion.Windows.Forms.Tools.FontListBox`) is a `ListBox`-derived control that automatically populates itself with all fonts installed on the user's system. It supports multiple selection modes, type-to-match auto-complete, horizontal scrollbars, item height control, and Office-style visual themes.910## When to Use This Skill1112Use this skill when you need to:13- **Display a list of installed system fonts** — auto-populated on creation14- **Allow users to select a font** — apply the selected font to labels, text boxes, or other controls15- **Configure selection modes** — single, multi-simple, or multi-extended selection16- **Enable type-to-match auto-complete** — `UseAutoComplete`17- **Apply Office visual styles** — `VisualStyle` with `FontListBoxStyle` enum18- **Control scrollbar visibility** — `HorizontalScrollbar`, `ScrollAlwaysVisible`19- **Handle font selection events** — `SelectedIndexChanged`2021## Component Overview2223| Property | Type | Description |24|---|---|---|25| `SelectionMode` | `SelectionMode` | One, MultiSimple, or MultiExtended |26| `UseAutoComplete` | `bool` | Type-ahead matching within the list |27| `Sorted` | `bool` | Sort font names alphabetically |28| `ItemHeight` | `int` | Height in pixels of each list item |29| `HorizontalScrollbar` | `bool` | Show horizontal scrollbar when items overflow |30| `HorizontalExtent` | `int` | Width (px) of the scrollable area when horizontal scrollbar is on |31| `ScrollAlwaysVisible` | `bool` | Keep scrollbars visible regardless of item count |32| `VisualStyle` | `FontListBoxStyle` | Office/Metro visual theme |3334## Documentation and Navigation Guide3536### Getting Started37📄 **Read:** [references/getting-started.md](references/getting-started.md)38- Assembly references and NuGet package setup39- Adding FontListBox via designer or programmatically40- Auto-population with system fonts41- SelectionMode — None, One, MultiSimple, MultiExtended42- Handling SelectedIndexChanged to apply font to another control4344### Customization and Behavior45📄 **Read:** [references/customization-and-behavior.md](references/customization-and-behavior.md)46- `ItemHeight` — row height per font entry47- `Sorted` — alphabetical sorting of font names48- `UseAutoComplete` — type-to-match as user types49- `HorizontalScrollbar` + `HorizontalExtent`50- `ScrollAlwaysVisible` — force scrollbars always visible5152### Visual Styles53📄 **Read:** [references/visual-styles.md](references/visual-styles.md)54- `VisualStyle` property using `FontListBoxStyle` enum55- Available styles: Default, Metro, Office2016Colorful, Office2016White, Office2016Black, Office2016DarkGray5657## Quick Start5859**C#:**60```csharp61using Syncfusion.Windows.Forms.Tools;6263FontListBox fontListBox1 = new FontListBox();64fontListBox1.Size = new System.Drawing.Size(160, 94);65fontListBox1.UseAutoComplete = true;66fontListBox1.SelectionMode = System.Windows.Forms.SelectionMode.One;67fontListBox1.SelectedIndexChanged += FontListBox1_SelectedIndexChanged;68this.Controls.Add(fontListBox1);6970private void FontListBox1_SelectedIndexChanged(object sender, EventArgs e)71{72 label1.Font = new System.Drawing.Font(73 fontListBox1.SelectedItem.ToString(), 11, System.Drawing.FontStyle.Regular);74}75```7677**VB.NET:**78```vb79Imports Syncfusion.Windows.Forms.Tools8081Dim fontListBox1 As New FontListBox()82fontListBox1.Size = New System.Drawing.Size(160, 94)83fontListBox1.UseAutoComplete = True84fontListBox1.SelectionMode = System.Windows.Forms.SelectionMode.One85AddHandler fontListBox1.SelectedIndexChanged, AddressOf FontListBox1_SelectedIndexChanged86Me.Controls.Add(fontListBox1)8788Private Sub FontListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)89 label1.Font = New System.Drawing.Font(90 fontListBox1.SelectedItem.ToString(), 11, System.Drawing.FontStyle.Regular)91End Sub92```9394## Common Use Cases9596| Scenario | Properties to Set |97|---|---|98| Font picker for a text editor | `SelectionMode = One`, handle `SelectedIndexChanged` |99| Multi-font selection | `SelectionMode = MultiExtended` |100| Fast keyboard navigation | `UseAutoComplete = true` |101| Always show scrollbar | `ScrollAlwaysVisible = true` |102| Alphabetically sorted list | `Sorted = true` |103| Office-style appearance | `VisualStyle = FontListBoxStyle.Office2016Colorful` |