Sign in to follow this  
Followers 0
Max Kipness

listview scrolling to right?

6 posts in this topic

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

Share this post


Link to post
Share on other sites



Try $LVS_REPORT instead of $LVS_LIST

That 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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0