Row height on datagridview

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 7 years and 3 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
swindmiller
Posts: 64
Last visit: Tue Aug 22, 2023 11:59 am

Row height on datagridview

Post by swindmiller »

Can you give an example of how or where to set the row height on a datagridview?

I want to use it on a touchscreen and want the cells to be bigger to be easier to touch.


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

Re: Row height on datagridview

Post by davidc »

I removed the duplicate PowerShell Studio topic.

You can set the height of a row by accessing the row's object:
  1. foreach ($Row in $datagridviewResults.Rows)
  2. {
  3.     $Row.Height = 20
  4. }
David
SAPIEN Technologies, Inc.
User avatar
swindmiller
Posts: 64
Last visit: Tue Aug 22, 2023 11:59 am

Re: Row height on datagridview

Post by swindmiller »

Perfect, this worked great!

And sorry I had deleted that post that I posted in the wrong forum, not sure why it still showed up.

Thanks!
This topic is 7 years and 3 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