ListView cloning removes the default font functionality

前端 未结 1 1316

I have a basic ListView with a few columns.

I create a ListViewItem using:

ListViewItem item = new ListViewItem();
item.Text =          


        
相关标签:
1条回答
  • 2021-01-25 10:00

    Just Dispose the current Font of the ListView before setting a new one:

    ListView1.Font.Dispose();
    ListView1.Font = new Font("Microsoft Sans Serif", 15F, FontStyle.Regular);
    

    This way, the ListViewItem-s including the cloned ones will be forced to inherit the new font of the ListView control.

    0 讨论(0)
提交回复
热议问题