font changed for data gridview and it is not following the form's font

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
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.
This topic is 5 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
jsira2003@yahoo.com
Posts: 117
Last visit: Tue Jul 11, 2023 6:18 am

font changed for data gridview and it is not following the form's font

Post by jsira2003@yahoo.com »

I am not sure what happened but It seems I have changed the font my data grid's are using and I am not able to get the font to match what the form is using. It appears there are no properties on the datagridview to change the font. How am I able to change the font my datagridview's use? My form uses seguo ui and my datagrid's use consolas.

Thanks,
John
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: font changed for data gridview and it is not following the form's font

Post by davidc »

The DataGridView should inherit the font style of the form by default, unless you changes the RowsDefaultCellStyle property or set the grid's Font property in your script.

https://info.sapien.com/index.php/guis/gui-controls/ambient-properties
David
SAPIEN Technologies, Inc.
This topic is 5 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked