How to add strings to columns of a Listview control

Help for writing scripts and plugins.
User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany
I'm playing with the new listview control in details mode but can't find a way to fill the columns with strings. The AddItem method always copies them to the first column. I can enumerate the DialogListColumns object and get the name of the columns but don't know how to add items to them.
Note that I'm no professional but a try & error self-educator so a verbose answer would be very appreciated.
Thanks.

User avatar
jon
GPSoftware
Posts: 7412
Joined: 04 Nov 2004, 02:40
OS: Windows 10 64-bit
Opus: Latest Beta
Location: Melbourne
Contact:
Use the DialogListItem.subitems member, e.g. item.subitems(0) = "blah" would set the value of the second column.

User avatar
kundal
H&P
Posts: 897
Joined: 07 Apr 2010, 10:06
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: Germany
Not too verbose to be honest. :D
After a lot of trying I got it working. Thanks.

User avatar
Rated RR
Registered Opus Pro User
Posts: 72
Joined: 14 Apr 2007, 13:26
OS: Windows 7 64-bit
Opus: Directory Opus 12
Location: Croatia
Contact:
So, there is no way to do it via GUI? Will this be changed in some future version?
| Opus 12 | W10 x64 | Intel H81::i3.4170 3.7GHz | RAM/SSD: 8/512 Samsung 850 | GeForce GTX560 | UEFI


Return to “Script & Plugin Development”