Here's an example ---
Script Code tab:
function OnClick(data)
{
var msg;
var dlg = DOpus.Dlg;
dlg.window = DOpus.Listers(0);
dlg.template = "dialog1";
dlg.detach = true;
dlg.Show();
var lst = dlg.Control("listview1");
var col = lst.columns;
col.AddColumn("Item");
col.AddColumn("Subitem 0");
col.AddColumn("Subitem 1");
col.AutoSize();
do // msg loop
{
msg = dlg.GetMsg();
if (msg.event == "click" && msg.control == "button1")
{
var pos = lst.AddItem("Item " + lst.count);
var lst_item = lst.GetItemAt(pos);
lst_item.subitems(0) = "Subitem 0";
lst_item.subitems(1) = "Subitem 1";
}
} while (msg == true);
}
Resources tab:
<resources>
<resource name="dialog1" type="dialog">
<dialog fontsize="8" height="169" lang="english" resize="yes" width="201">
<control height="17" name="button1" resize="yw" title="Add Item" type="button" width="197" x="1" y="150" />
<control height="147" name="listview1" resize="wh" type="listview" viewmode="details" width="197" x="1" y="1" />
</dialog>
</resource>
</resources>