Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
In our application we have a standard ListView, displaying 26 lines without requiring any scrollbars.

When running the application in Windows 7, the same ListView displays only 21 lines in plain sight and you have to scroll to see the rest.

Obviously, Windows 7 renders the ListViewItem larger, with more spacing or padding or something.

How do I compensate for this without changing the font size? It needs to display the same amount of rows as in Windows XP without scrolling. Can I somehow access a padding or spacing property on a ListViewItem?

In reply to the answers give thus far -
Jason9825: The ListView's sizing is not the problem, but rather the size of the rows WITHIN the listview, I.E, the ListViewItems.

Abhinav S: No, it's not a resolution problem.

danberlove: The question of WHY I want to do this is irrelevant, the question we should focus on is HOW can this be done.
Posted
Updated 16-Feb-10 2:09am
v4

Not an answer I'm afraid, just joining in as I noticed the same sort of thing with the MonthCalendar control... it is quite a lot larger under Weven which caused me some layout issues in an existing application. :mad:
 
Share this answer
 
What about the AutoSizeMode property on the Windows Form? Does that compensate for the growing ListBox by proportionally increasing the size of the Windows Form? Just a wild guess.
 
Share this answer
 
Comments
MatthysDT 2-Aug-10 5:09am    
Reason for my vote of 1
bad answer
Off the top of my hat, could this be a simple resolution issue?
 
Share this answer
 
Comments
MatthysDT 2-Aug-10 5:08am    
Reason for my vote of 1
bad answer, READ the question!
really an interesting question...
but does that really matter if it's 26 rows or 21?
 
Share this answer
 
Comments
MatthysDT 2-Aug-10 5:06am    
My question wasn't WHY, it was HOW.
But anyway, here's WHY!
Our software displays the optimal amount of rows so that they don't have to scroll, this depends on the user's resolution and the size of the main window and the current sub-window of our application.
Hi !

Did you find a solution ? I have the same problem

Gabriel
 
Share this answer
 
Gabriel

No, unfortunately I still have no solution for this problem.
If you are more successful, please let me know.

Regards
 
Share this answer
 

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