Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 3

Multi column listview control in a Basic MSI project

I am trying to implement a multi column listview control in a Basic MSI project, but there doesn't seem to be any documentation for doing so.

I am able to add an entry to the listview control much like a listbox:

sQuery = "SELECT * FROM ListView WHERE Property='MYLIST'"; 
nReturn = MsiDatabaseOpenView(hDB, sQuery, hView);

hRec = MsiCreateRecord(5);

MsiRecordSetString(hRec, 1, 'MYLIST');
MsiRecordSetInteger(hRec, 2, 1);
MsiRecordSetString(hRec, 3, "Item 1");
MsiRecordSetString(hRec, 4, "Item 1");
MsiRecordSetString(hRec, 5, "");



However, I do not see a way to do any of the following:

Add multiple column entries
Set the column widths
Add column headers
Display an icon in a column

Does anyone know if any of these things are possible?
Labels (1)
0 Kudos
(3) Replies
Flexera Alumni

Alas, no: according to the MSI topic "ListView Control", it's a single column of data with an icon next to each value.
0 Kudos
Level 6

Then how is it that the SdDiskSpace2 (Requirements) dialog has a ListView control with multiple columns/headers?

I am desperately looking for an example of how to do this with InstallScriptMSI project
0 Kudos
Flexera Alumni

The original question and restriction were about Basic MSI; with InstallScript or InstallScript MSI, you have a bit more flexibility.

I haven't tried it, but see for example [thread=127075]this thread[/thread] for what claims to be InstallScript wrappers around the Windows API functions for working with a list-view...
0 Kudos