Sign in to follow this  
Followers 0
qwert

What controls the number of ListView columns?

4 posts in this topic

I realize this is probably simple, but I can't find a clear reference or example, so I have to ask.

I'm trying to add a FileSize column to a list of filenames, but adding GUICtrlCreateListViewItem ($FileSize, $hView) causes another entry in the table, not another column. What controls the number of columns? And where is it documented?

Thanks for any assistance.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Open up the help file and look the entry for GUICtrlCreateListView. It creates the list view. The columns are separated by the vertical line(|). More items can be added with a vertical line separating them and will add more columns.

Then you add the list view items with GUICtrlCreateListViewItem.

Edited by sleepydvdr

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

#Include <GuiListView.au3>

_GUICtrlListView_AddColumn($hWnd, $sText[, $iWidth = 50[, $iAlign = -1[, $iImage = -1[, $fOnRight = False]]]])

It's standard UDF. Search for it in the Helpfile.

Share this post


Link to post
Share on other sites

The columns are separated by the vertical line(|).

It never clicked with me that the vertical lines were actually defining the columns/fields. The help file and examples now make sense ... and my column addition worked.

Thanks to you both.

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