checkedlistbox itemHeight

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.
Locked
User avatar
JaimeBou
Posts: 20
Joined: Fri Feb 09, 2018 9:57 am

checkedlistbox itemHeight

Post by JaimeBou »

I am using a checkedlistbox and would like to space out the items and seemingly can't make it work.

I did some reading and from what I found this should have worked:

$checkedlistboxHM_DC1.DrawMode = 'OwnerDrawVariable'
$checkedlistboxHM_DC1.ItemHeight = 40

It's not working and I can't seem find anything else documented on how this would work.

Could you help please?

jvierra
Posts: 14546
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: checkedlistbox itemHeight

Post by jvierra »

What does "space out the items " mean?

User avatar
JaimeBou
Posts: 20
Joined: Fri Feb 09, 2018 9:57 am

Re: checkedlistbox itemHeight

Post by JaimeBou »

I have several items in the checkedlistbox and would like to change the vertical spacing between the items.

jvierra
Posts: 14546
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: checkedlistbox itemHeight

Post by jvierra »

To change the spacing set the font to one that has more spacing.

User avatar
JaimeBou
Posts: 20
Joined: Fri Feb 09, 2018 9:57 am

Re: checkedlistbox itemHeight

Post by JaimeBou »

Thank you for your suggestion.
Although it may be the only option, it's really not a good one.
It would save a lot of time if you have a suggested font with more spacing.
As it stands, I would have to go through the list of each font and see if the spacing would work.

Thanks again.

jvierra
Posts: 14546
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: checkedlistbox itemHeight

Post by jvierra »

This is an example of how this works:
Attachments
Test-CheckedList Spacing.psf
(21.8 KiB) Downloaded 28 times

User avatar
JaimeBou
Posts: 20
Joined: Fri Feb 09, 2018 9:57 am

Re: checkedlistbox itemHeight

Post by JaimeBou »

Got it.

Thank you sir.

Locked