Hello!
I am new to this so this i maybe a weird question.
To easier keep track on large amont of tanks, textboxes etc. I generate all this from the code. what i now want is to create a scaleRangeFill on each tank depending on how many tanks The instalation is keeping track on. This for visualizing a requested dept(scaleRangeFill) and an actualdepth(tank). For this I have used the following code. Witch not working, but I cant figure out why.
Here is my question:
Q1:This metode seems to not working. I cant get this working with making arrays of "scaleRangeFill".
But what should I do if I want do creat this dynamicaly???.
Q2: Is there a another way to visualize a requested depth next to an tank other than create two tanks on for req dept and one for actualdepth.
NationalInstruments.UI.ScaleRangeFill[] scaleRangeFill;
NationalInstruments.UI.ScaleRangeFill scaleRangeFillSingle;
private void btnSingleBack_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
if (btn.Name == "btnSingleBack")
{
if (btnSingleViewUMode.Text == "ALL")
{
int amount = tankActualDepth.Length;
scaleRangeFill = new NationalInstruments.UI.ScaleRangeFill[amount-1];
for (int i = 1; i < amount - 1; i++)
{
this.tankActualDepth[i].RangeFills.Clear();
scaleRangeFill[i-1].Range = new NationalInstruments.UI.Range(0, slideSingle.Value);
this.tankActualDepth[i].RangeFills.AddRange(new NationalInstruments.UI.ScaleRangeFill[] { scaleRangeFill[i-1] });
}
}
else
{
scaleRangeFillSingle = new NationalInstruments.UI.ScaleRangeFill();
scaleRangeFillSingle.Range = new NationalInstruments.UI.Range(0, slideSingle.Value);
this.tank.RangeFills.AddRange(new NationalInstruments.UI.ScaleRangeFill[] { scaleRangeFillSingle });
}
}
tabControl.SelectedTab = this.tabPageControl;
}
With Regard
ellile