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 1 month old and the forum Administrator has chosen for old topics to be locked when a reply is attempted. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jsira2003@yahoo.com
Posts: 58
Joined: Fri Apr 07, 2017 9:47 am

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

Post by jsira2003@yahoo.com » Mon Oct 15, 2018 5:20 am

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: 5474
Joined: Thu Aug 18, 2011 4:56 am

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

Post by davidc » Mon Oct 15, 2018 7:30 am

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.