Using LVSCW_AUTOSIZE_USEHEADER for ListView_SetColumnWidth, is it possible to somehow calculate what that width should be prior to setting the column width?
What I'm working on is creating a a display of sets of data where I have what each item's length is (giving me a sum total of the data length), and a column header as well for the ListView. The way I tried this at first was to proportionally size each column based on percentage of total data length, which works ok as long as the data length is not shorter than the column header.
I want to make sure the column header shows, and columns with 1 byte of data show, but I'm struggling for ideas on how to turn this into a 'dynamic" algorithm to handle most situations.
Any ideas or a shove in a different direction would be much appreciated.
What I'm working on is creating a a display of sets of data where I have what each item's length is (giving me a sum total of the data length), and a column header as well for the ListView. The way I tried this at first was to proportionally size each column based on percentage of total data length, which works ok as long as the data length is not shorter than the column header.
I want to make sure the column header shows, and columns with 1 byte of data show, but I'm struggling for ideas on how to turn this into a 'dynamic" algorithm to handle most situations.
Any ideas or a shove in a different direction would be much appreciated.
Comment