Loading...
Loading...
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.
npx skill4agent add syncfusion/winforms-ui-components-skills syncfusion-winforms-fontlistboxFontListBoxSyncfusion.Windows.Forms.Tools.FontListBoxListBoxUseAutoCompleteVisualStyleFontListBoxStyleHorizontalScrollbarScrollAlwaysVisibleSelectedIndexChanged| Property | Type | Description |
|---|---|---|
| | One, MultiSimple, or MultiExtended |
| | Type-ahead matching within the list |
| | Sort font names alphabetically |
| | Height in pixels of each list item |
| | Show horizontal scrollbar when items overflow |
| | Width (px) of the scrollable area when horizontal scrollbar is on |
| | Keep scrollbars visible regardless of item count |
| | Office/Metro visual theme |
ItemHeightSortedUseAutoCompleteHorizontalScrollbarHorizontalExtentScrollAlwaysVisibleVisualStyleFontListBoxStyleusing 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);
}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| Scenario | Properties to Set |
|---|---|
| Font picker for a text editor | |
| Multi-font selection | |
| Fast keyboard navigation | |
| Always show scrollbar | |
| Alphabetically sorted list | |
| Office-style appearance | |