I was looking for the text sizing option control in datagridview. I could not find one. Is this possible? If so how?
thanks,
John
formatting the size text in datagridview
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- jsira2003@yahoo.com
- Posts: 117
- Last visit: Tue Jul 11, 2023 6:18 am
- jsira2003@yahoo.com
- Posts: 117
- Last visit: Tue Jul 11, 2023 6:18 am
Re: formatting the size text in datagridview
and if I don't use the designer and want a text command is it something like this?:
datagridviewtable.defaultcellstyle.font.size = "12"
thanks,
John
datagridviewtable.defaultcellstyle.font.size = "12"
thanks,
John
Re: formatting the size text in datagridview
No. You cannot set the size. You must create a font and set the "font" property to the new font.
Start by doing it in the designer and inspect the code that is produced to see how this is done.
Start by doing it in the designer and inspect the code that is produced to see how this is done.
- jsira2003@yahoo.com
- Posts: 117
- Last visit: Tue Jul 11, 2023 6:18 am
Re: formatting the size text in datagridview
i used the cellstyle builder and it works fine. However when you save your program and re-open it, the cellstyle builder defaults back to the 14 point setting and I lose the font size I put in. In my view the cell style builder should maintain the font size I defined and I should not have to reset it in my datagridview with every build of my program.
I think this could be a bug!
John
I think this could be a bug!
John