05-12-2006 09:09 AM
05-15-2006 04:26 AM
Hi Leanne,
Would it be possible for you to post a copy of your code for me to look at?
Thanks
Emma Rogulska
NIUK & Ireland
05-31-2006 03:32 AM
05-31-2006 05:00 AM - edited 05-31-2006 05:00 AM
ControlID is always an integer: it identifies the control on the panel pointed to by Panel Handle.
When you use the control name (e.g. PANEL_GRAPH) you are actually using a macro defined in the .h file associated to your user interface file, i.e. you are using an integer value.
In your problem, you need to address multiple controls in a loop: my personal solution is to create an array of integers to hold control IDs and then use the array values inside the loop, this way (look at the red parts; I'm supposing PANELCHILE is your panel the grapgh lie on and childHandle is its handle):
int ctrl[10];
// Create the array of control IDs
ctrl[0] = PANELCHILD_GRAPH;
ctrl[1] = PANELCHILD_GRAPH_2;
...
ctrl[9] = PANELCHILD_GRAPH_10;
while(ww<=end) {
DisplayPanel (childHandle);
PlotIntensity(childHandle, ctrl[ref], Dec, column_num, row_num,
VAL_DOUBLE, colors, VAL_WHITE, colour_num, col, pix);
ww=ww+step;
ref=ref+1;
}
Last tip: the online help for built-in functions shows you also the type of variable the function expects for this parameter; right-clicking on ControlID parameter in PlotIntensity function panel will show you the following:
Control Name: ControlID
Data type: int
Message Edited by Roberto Bozzolo on 05-31-2006 12:04 PM
05-31-2006 05:40 AM