473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ListView Control: Some way to estimate size needed?

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
4 1767
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
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
Per Douglas J. Steele:
http://I.Am/DougSteele


How you do dat?

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

"(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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Fan Ruo Xin | last post by:
How to estimate the size of log space when I need to run "INSERT INTO tgt_tbl SELECT * FROM src_tbl WHERE..." ? What is the difference of before image between the above INSERT stmt and the...
4
by: Paddy | last post by:
How do I select a subitem from a listview after clicking on the first column? Couldn't find it in MSDN. Thank you. Paddy.
0
by: willow1480 | last post by:
I am developing a small little Service Control Application. I am using a listview control with checkboxes and getting the list of services I want to control from a text file. When you check a...
12
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.