Luis,
I want to set a different label for each column of a table that I built programatically. I have the following code but it only sets all of the columns to the same value. Do you know how I can set each column to a different value. I have included a portion of my code which adds columns and supposedly sets the column header. Can you tell me why each column is not being set to it's own specific value? I have used the debugger and the_col_des contains a different value each time through the loop, yet all columns end up with the last value.
thanks,
Donna
for (int cix = 0; cix < num_cols; cix++)
{
Info& colinfo = the_table[cix][0] ;
string col_des = colinfo.getShortTitle();
const char* the_col_des = col_des.c_str();
error = SetTableColumnAttribute (table_panel, TABLE_P_NORMAL_TABLE, -1, ATTR_USE_LABEL_TEXT, 1);
error = SetTableColumnAttribute (table_panel, TABLE_P_NORMAL_TABLE, -1, ATTR_LABEL_TEXT, the_col_des);
error = InsertTableColumns (table_panel, TABLE_P_NORMAL_TABLE, 1, 1, VAL_CELL_STRING);
}
}
}