I'm trying to make a ListBox that shows multiple columns. I can get that much working but I can only seem to put a header on the first column. Here's my code:
DGListSetHeaderItemCount(dialogID, ResultsList, 2);
DGListSetHeaderFlags(dialogID, ResultsList, true, false, false);
DGListSetHeaderItemFlags(dialogID, ResultsList, 1, DG_IS_LEFT|DG_IS_NOTRUNC, true);
DGListSetHeaderItemText(dialogID, ResultsList, 1, "Property");
DGListSetHeaderItemFlags(dialogID, ResultsList, 2, DG_IS_LEFT|DG_IS_NOTRUNC, true);
DGListSetHeaderItemText(dialogID, ResultsList, 2, "Value");
//set up the columns
w = DGListGetItemWidth(dialogID, ResultsList);
DGListSetTabFieldCount (dialogID, ResultsList, 2); //two columns in the data
DGListSetTabFieldData(dialogID, ResultsList, 1, 0, w/2-1, DG_IS_LEFT, DG_IS_NOTRUNC, true, true);
DGListSetTabFieldData(dialogID, ResultsList, 2, w/2, w, DG_IS_LEFT, DG_IS_NOTRUNC, false, true);
//some test data
DGListInsertItem (dialogID, ResultsList, DG_LIST_BOTTOM);
DGListSetItemText (dialogID, ResultsList, DG_LIST_BOTTOM, "testppty\ttestvalue");
I saw another post that suggested that you have to set the header size, eg
(DGListSetHeaderItemSize(dialogID, ResultsList, 1, 100);
but that doesn't seem to have any effect on the problem.
How do I get the header text on the second column to appear?