Hi,
I would like to import Label/Value pairs into my similar controls at each run of the program. This is because the list may change periodically and instead of having to change each control seperately, I can just change a text file and all would be changed. However, I am using SavePanelState and it replaces what I import. My code looks like this:
vars1file = OpenFile ("d:\\ctds2\\ringvars1.txt", VAL_READ_ONLY,
VAL_OPEN_AS_IS, VAL_ASCII);
for(x=0; x<200; x++)
ReadLine (vars1file, variables[x], 30);
CloseFile (vars1file);
for (y=0; y<20; y++){
ClearListCtrl (ser1panel, SER1PANEL_SER1_1 + y);
ClearListCtrl (ser2panel, SER2PANEL_SER1_1 + y);
for (x=0; x<
200; x++)
{
Fmt(varvalue, "%s<%s%i", "value", x);
InsertListItem (ser1panel, SER1PANEL_SER1_1 + y, -1, variables[x],
varvalue);
InsertListItem (ser2panel, SER2PANEL_SER1_1 + y, -1, variables[x],
varvalue);
}
}
/* Recall previous panel states here */
RecallPanelState (ser2panel, "d:\\CTDS2\\pnlstate.pnl", 3);
RecallPanelState (ser1panel, "d:\\CTDS2\\pnlstate.pnl", 4);
Any Ideas??