Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi to all!

i create a list box with five items

i want to increase the height of items

means the distance between items
Posted

1 solution

You can use ItemHeight property.

When the DrawMode property is set to DrawMode.OwnerDrawFixed, all items have the same height. When the DrawMode property is set to DrawMode.OwnerDrawVariable, the ItemHeight property specifies the height of each item added to the ListBox. Because each item in an owner-drawn list can have a different height, you can use the GetItemHeight method to get the height of a specific item in the ListBox. If you use the ItemHeight property on a ListBox with items of variable height, this property returns the height of the first item in the control.
The maximum height of a ListBox item is 255 pixels.
http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.itemheight.aspx[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900