Changing the ListView FontSize

  • Thread starter Thread starter Jin Kim
  • Start date Start date
J

Jin Kim

Hi all,
Is there any way to resize my font in a Listview without
changing the column header size? Currently when I change
the font size the column header resizes as well. I am
using Compact Framework with C#.

Thanks in advance.
 
Jin said:
Hi all,
Is there any way to resize my font in a Listview without
changing the column header size? Currently when I change
the font size the column header resizes as well. I am
using Compact Framework with C#.

Thanks in advance.


I think you said the "Detail" mode, right?

You can set the font of each individial ListViewItem. The ListViewItem
has its own font property.
You can even set different ListViewItems have different font size.

If you set in designer of VS, set the font of the itme in items collection.
If you set in program code, set the Font property of each ListViewItem.
 
Yes I am working in detail mode.
I tried your suggestion with the following line of code.
ListViewItem lvItem = new ListViewItem(jp);
lvItem.ListView.Font.Size = 16;

The complier returned:
(544): Property or indexer 'System.Drawing.Font.Size'
cannot be assigned to -- it is read only

I do believe in the full Framework this property is able
to be written to.

Thanks for the help!
 
Back
Top