|
-
January 28th, 2014, 08:23 AM
#12
Re: Control for owner-drawing items with 1 or 2 columns ?
 Originally Posted by Ralf Schneider
ok, with SetIconSpacing I can define columns.
Em... no, you don't define columns...you define iconspacing.
Columns will be a consequence of various other metrics which after calculations of all those metrics will end up with a number of columns that can fit on a single row.
Some of those metrics you can provide in your code (like icon spacing)
others are OS (or theme) defined (like control borders, inner padding, cell padding, cell borders)...
a couple are user manageable through the control panel (size of scrollbars, font, DPI, scaling, ...)
Your assumptions may not work:
- if the user has a different flavour of windows (classic view or themed view)
- if the user is using another theme
- if the user has selected a different DPI setting for this screen (and/or enabled XP style DPI scaling)
- if the user has selected a different systemfont
- if the user is using some of the features for improving the OS for people with disabilities.
- ...
You cannot in any reliable way control "number of columns" on a listcontrol in iconview.
The idea is that you give your control a certain width (which may get translated according to DPI settings).
The OS will calculate how many columns fit in that width
You deal with the number of columns the OS has given you.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|