Max Kipness Posted December 4, 2007 Posted December 4, 2007 I'm trying to create a listview that looks like a list just for the purpose of having an icon image at the beginning of each line. However, now that I have it looking they way I want, when the list fills up vertically, instead of adding a new line below and adding scroll bars on the right side, it's adding the new line to the right and adding scrollbars on the bottom (horizontally). Anybody know why? Here is the relevant code: ; Creating the listview with options $statuslist = GUICtrlCreateListView("",20,270,560,80,$WS_EX_WINDOWEDGE+$LVS_LIST) ; Adding to the listview GUICtrlCreateListViewItem(_NowTime(3) & " Line one, blah, blah...."$statuslist) GUICtrlSetImage(-1,"icons.icl",0) My program of course loops through and creates multiple lines, but again once the listview box fills up vertically, it adds content horizontally (or to the right) instead of continuing downward. Hopefully this makes sense. Any suggestions? Again I don't need columns, but am using listview instead of the standard list, to have an icon at the beginning of each line. Thanks, Max
Zedna Posted December 4, 2007 Posted December 4, 2007 Try $LVS_REPORT instead of $LVS_LIST Resources UDF ResourcesEx UDF AutoIt Forum Search
Max Kipness Posted December 4, 2007 Author Posted December 4, 2007 Zedna said: Try $LVS_REPORT instead of $LVS_LISTThat puts it back at default for listview. I don't want the column header bar at all. I want a basic list, I just want the ability to have an icon at the beginning of each line.Any other ideas?Max
Zedna Posted December 4, 2007 Posted December 4, 2007 (edited) You can have ListView in REPORT style but without Header: $LVS_NOCOLUMNHEADER Edited December 4, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Max Kipness Posted December 4, 2007 Author Posted December 4, 2007 Zedna said: You can have ListView in REPORT style but without Header: $LVS_NOCOLUMNHEADERThanks. I was just noticing that in the help file. But now in report style, I have to figure out how to get the column widths wide enough for the text in this field. Padding with spaces only works to a certain width. I guess there is a UDF control for width.Thanks again.Max
Zedna Posted December 4, 2007 Posted December 4, 2007 (edited) Max Kipness said: Thanks. I was just noticing that in the help file. But now in report style, I have to figure out how to get the column widths wide enough for the text in this field. Padding with spaces only works to a certain width. I guess there is a UDF control for width. Thanks again. Max GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 0, 70) 0 - zero based index of (here first) column 70 - width of this column in pixels Edited December 4, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
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