Listview Display problems

Jay1b

Contributor
Joined
Aug 3, 2003
Messages
640
Location
Kent, Uk.
I've carefully designed my screen to look nice and be fully functional, but whilst testing my program on another computer, the listview box was much bigger then needed creating a horrible horizontal scroll bar. I put this down to the screen resolution. So i tried the program on my own computer as each and every resolution, however every time it displayed correctly. This leaves me to think that its down to a different graphic card/driver. However i cant realistically test the program against every possible graphic card.

Firstly does anybody concur that it is down to the graphics card/driver? And secondly how can i possibly design the program to run correctly on each machine?

Thanks.
 
Jay1b said:
Firstly does anybody concur that it is down to the graphics card/driver? And secondly how can i possibly design the program to run correctly on each machine?

Thanks.

It might be to do with their screen font size (Large Fonts/Small Fonts) so I'd set your machine to view Large fonts first and test accordingly.

Found under: Control Panel->Display->Appearance->Font Size (in XP)

B.
 
Unless you are programming with something very graphics intensive or APIs that get much closer to the hardware layer, like DirectX, you should never need to test with graphics cards. Like Penfold69 said, check their font size. For that matter any other Windows settings you can think of that could cause control display irregularities. Open up the control panel and Tweak UI and see what you can find.

If the app just looks unpleasant because the listview's contents dont fit inside it well, it might be something you just have to live with. You could check the user's resolution and font size (if this turns out to be the problem) and possibly give the user a recommendation to change them to improve your program's display.
 
Fontsize......didnt think about that one. I tried changing my resolution to every possible combination on MY computer and it displayed perfectly everytime. I will try the fontsize first thing Monday morning.

Thanks.
 
Fontsize didnt work, I really dont know why its different.

I have written a piece of code that re-jigs the groupbox surrounding the listview and the formsize so it will always appear perfect. Although i am really puzzled by why i should have to do this in the first place.
 
I think i have the same prob as this guy. I have a listview in List mode but when there isnt enough space on the control to list all items it shoves them to the right and makes a HORIZONTAL scroll bar.
I want a VERTICAL scroll bar.
I have Scrollable set to True.

The 2.0 SDK Documentation says about the Scrollable Property "When this property is set to true, the ListView displays a vertical scroll bar to use when the number of items exceeds the size of the client area of the control. You can use this property to ensure that the user can access all items that are available in the ListView control."

So, it should work as a vertical bar!

Any ideas?
 
Which view are you using? Curiously, when using the "List" view, the ListView scroll horizontally, and all other views (small icon, large icon, details, etc) scroll vertically. There is no option to modify this behavior. This can be seen in Explorer as well as any other application that uses a ListView. I think you are stuck with it.
 
I was using List Mode. I was hoping to basically get a ListBox but with Icons.
I might just have to make a column or something and try to hide the header.
 
Last edited:
It might be more work, but you could try an owner-drawn ListBox. It isn't really that much work.
 
Back
Top