Jump to content

listview scrolling to right?


Max Kipness
 Share

Recommended Posts

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

Link to comment
Share on other sites

You can have ListView in REPORT style but without Header: $LVS_NOCOLUMNHEADER

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

Link to comment
Share on other sites

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 by Zedna
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...