Anteaus Posted March 6, 2009 Share Posted March 6, 2009 Re this thread:http://www.autoitscript.com/forum/index.php?showtopic=9159it seems to me that increasing the overall listview width is not the answer. Even when MUCH wider than the sum total of any displayed items, all of the items are still truncated. A VB forum suggest that a property exists for the listview-column width, but the method used in VB is clearly not applicable here. I need to solve this one because the data I'm displaying consists of directory trees in which the first part is always identical. Thus, the truncated listing is meaningless. OK, so the user can get it into some sort of readable format by dragging the headers but it looks a hell of a mess, and this has to be done every time the data is presented, since a GUI redraw will re-truncate the columns. Example: $lv=GUICtrlCreateListView (" Profile Image Path | User Account ",10,10,800,600)$lv1=GUICtrlCreateListViewItem("C:\Documents and Settings\UserOne.Domain | MyData",$lv)$lv2=GUICtrlCreateListViewItem("C:\Documents and Settings\UserTwo.Local | YourData",$lv)Displays:Profile Image Path |User AccountC:\Documents and Setting... MyData {Large whitespace}C:\Documents and Setting... YourData {Large whitespace}BTW, tried increasing the header widths, or padding the header with tabs. Then they got truncated too. -any ideas? Tested on XP SP3, Autoit 3.2.12.0 Link to comment Share on other sites More sharing options...
Zedna Posted March 6, 2009 Share Posted March 6, 2009 (edited) #include <ListViewConstants.au3> $lv=GUICtrlCreateListView (" Profile Image Path | User Account ",10,10,800,600) $lv1=GUICtrlCreateListViewItem("C:\Documents and Settings\UserOne.Domain | MyData",$lv) $lv2=GUICtrlCreateListViewItem("C:\Documents and Settings\UserTwo.Local | YourData",$lv) GUICtrlSendMsg($lv, $LVM_SETCOLUMNWIDTH, 0, $LVSCW_AUTOSIZE) Edited March 6, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Anteaus Posted March 7, 2009 Author Share Posted March 7, 2009 Thanks, this makes a significant improvement, data is now readable. The remaining problem is that the column headers are also being truncated, seemingly for no reason. For example even the word 'Host' is truncated when the hostnames are shorter than 5-6 letters. Any ideas how to solve this one? (tried $LVSCW_AUTOSIZE_USEHEADER) Link to comment Share on other sites More sharing options...
Zedna Posted March 7, 2009 Share Posted March 7, 2009 GUICtrlSendMsg($lv, $LVM_SETCOLUMNWIDTH, 0, 70); 70 is width of column 0 in pixels Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Anteaus Posted March 8, 2009 Author Share Posted March 8, 2009 GUICtrlSendMsg($lv, $LVM_SETCOLUMNWIDTH, 0, 70); 70 is width of column 0 in pixels Ah, I see. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now