﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » How to change listview items fonts?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 23 Sep 2026 21:54:50 GMT</lastBuildDate><ttl>20</ttl><item><title>How to change listview items fonts?</title><link>http://forum.strataframe.net/FindPost24662.aspx</link><description>I have a SF listview and want to change the font for its items, I though that by changing the font in the listview will take care of that, but nope, it will only change the font for the columns.&lt;br&gt;
&lt;br&gt;
Then I try in the OnLoad with the following code:&lt;br&gt;
[codesnippet]&lt;br&gt;
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)&lt;br&gt;
        MyBase.OnLoad(e)&lt;br&gt;
&lt;br&gt;
        '-- Change the font of the listview items&lt;br&gt;
        For Each item As ListViewItem In Me.lstItemsStock.Items&lt;br&gt;
            item.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br&gt;
        Next&lt;br&gt;
&lt;br&gt;
    End Sub&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
That did not work either, so here is the question: How to change the font for the ListViewItems in the SF ListView?</description><pubDate>Sun, 20 Sep 2009 10:19:03 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to change listview items fonts?</title><link>http://forum.strataframe.net/FindPost24665.aspx</link><description>Yup, that was the very reason that we added that method, to expose the entire list item so you can do whatever necessary.  Good find ;)</description><pubDate>Sun, 20 Sep 2009 10:19:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to change listview items fonts?</title><link>http://forum.strataframe.net/FindPost24663.aspx</link><description>Never mind, I found it after looking at the obvious for other settings in the ListView "RowPopulated" event.&lt;br&gt;
&lt;br&gt;
Here is the code...&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
&lt;br&gt;
Dim myListViewItemFont As Object = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br&gt;
&lt;br&gt;
    Private Sub lstItemsStock_RowPopulated(ByVal sender As System.Object, ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatedEventArgs) Handles lstItemsStock.RowPopulated&lt;br&gt;
            e.ListViewItem.Font = myListViewItemFont&lt;br&gt;
&lt;br&gt;
    End Sub&lt;br&gt;
[/codesnippet]</description><pubDate>Fri, 18 Sep 2009 18:48:05 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>