ReoGrid icon indicating copy to clipboard operation
ReoGrid copied to clipboard

How do I change the font size for row and column headers?

Open bvictim opened this issue 3 years ago • 3 comments

How do I change the font size for row and column headers? vb.net thanks!

bvictim avatar Mar 22 '22 11:03 bvictim

image How to adjust the font?

bvictim avatar Mar 26 '22 11:03 bvictim

you can use reoGridControl.CurrentWorksheet.SetScale to workaround or you need use relfect such as

 Assembly asm = reoGridControl.GetType().Assembly;
            Type gdiR = asm.GetType("unvell.ReoGrid.WinForm.GDIRenderer");
            FieldInfo field = gdiR.GetField("HeaderFont", BindingFlags.Static | BindingFlags.NonPublic);
            field.SetValue(null, new Font(
            "微软雅黑", 8));

liufeias avatar Jul 14 '22 03:07 liufeias

you can use reoGridControl.CurrentWorksheet.SetScale to workaround or you need use relfect such as

 Assembly asm = reoGridControl.GetType().Assembly;
            Type gdiR = asm.GetType("unvell.ReoGrid.WinForm.GDIRenderer");
            FieldInfo field = gdiR.GetField("HeaderFont", BindingFlags.Static | BindingFlags.NonPublic);
            field.SetValue(null, new Font(
            "微软雅黑", 8));

the result shows gdiR is null, how do i fix it? i using version↓ image

HaRiGiToU avatar Sep 12 '23 01:09 HaRiGiToU