By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

ListView Control: Some way to estimate size needed?

P: n/a
I'm using one of these things as a dynamically-populated picklist.

If nothing else, I'll just save .RecordCount after populating it and then
Docmd.MoveSize with varying Height/Width value pairs
(Small-Medium-Large-Humongous...) depending on the number of records loaded.

Is there a more elegant method? i.e. something where the ListView knows
something about what it's square pixels would have to be in order to show all
contents?
--
PeteCresswell
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Not sure about estimating the width (although there might be something at
Stephen Leban's site http://www.lebans.com ), but take a look at what Randy
Birch has at http://vbnet.mvps.org/code/comctl/lvcolumnautosize.htm : it's
how to automatically resize listview columns through APIs.

Obligatory warning: Randy's site is aimed at VB programmers, not Access
programmers. Since there are significant differences between the controls
available on VB forms vs. those available on Access forms, some of his
examples do not port directly into Access. This particular example is one of
those: it uses a control array (the 3 option buttons at the bottom of the
form), which Access does not support.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"(Pete Cresswell)" <x@y.z> wrote in message
news:ah********************************@4ax.com...
I'm using one of these things as a dynamically-populated picklist.

If nothing else, I'll just save .RecordCount after populating it and then
Docmd.MoveSize with varying Height/Width value pairs
(Small-Medium-Large-Humongous...) depending on the number of records loaded.
Is there a more elegant method? i.e. something where the ListView knows
something about what it's square pixels would have to be in order to show all contents?
--
PeteCresswell

Nov 13 '05 #2

P: n/a
Per Douglas J. Steele:
Not sure about estimating the width (although there might be something at
Stephen Leban's site http://www.lebans.com ), but take a look at what Randy
Birch has at http://vbnet.mvps.org/code/comctl/lvcolumnautosize.htm : it's
how to automatically resize listview columns through APIs.


Thanks... I'll start digging into it - might also address another concern:
column widths.... Sometimes the control seems to handle these well, other times
I'm getting major truncation...
--
PeteCresswell
Nov 13 '05 #3

P: n/a
Per Douglas J. Steele:
http://I.Am/DougSteele


How you do dat?

Some service of V3?
--
PeteCresswell
Nov 13 '05 #4

P: n/a

"(Pete Cresswell)" <x@y.z> wrote in message
news:49********************************@4ax.com...
Per Douglas J. Steele:
http://I.Am/DougSteele


How you do dat?

Some service of V3?


Yup.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.