Re: ListView


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Brian Levantine on February 13, 2007 at 09:32:35:

In Reply to: ListView posted by Grant Foraker on February 05, 2007 at 11:07:54:

Hi Grant. There's a cart before the horse problem here. You can't really know in advance what the required width should be without first sizing the columns. Normally the columns would be sized to fit the window (list). Once you've created your dialog you can the get the size of the list client (COS.GetClientRect) area and use that value to set your column widths. I usually use a fixed width for all but the last column and then I adjust the last to fit exactly. Keep in mind that these values are in pixels and should not be affected by the font size. Aslo, keep in mind that when your list contents exceeds the visible portion of the list control you'll get a horizontal scrollbar which will in turn cause a verticle scrollbar to appear and truncate your last column. Usually list control implimentations will leave enough room at the right to allow for the scrollbar, which then makes this all moot unless you are watching for content changes and dynamically size the last column when a scrollbar is present. Yuck - it's just not worth the trouble for 1/4 inch of real estate.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):






[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]