Topics
Replies
tomas.malukas.work
14 Jul 2023, 17:48
( Updated at: 21 Dec 2023, 09:23 )
cAlgo.API.Line controls are not being updated after coordinate change
Hi Team,
After 4.8.15 update all cAlgo.API.Line controls are not being updated after coordinate change while other are as expected..
Here is example-test where this is clearly visible, please fix the issue.
Thanks.
using cAlgo.API;
namespace cAlgo.Robots
{
[Robot(AccessRights = AccessRights.FullAccess)]
public class TESTS : Robot
{
protected override void OnStart()
{
#if DEBUG
Debugger.Launch();
#endif
line.X2 = Chart.Width;
Chart.AddControl(canvasMain);
canvasMain.AddChild(btn);
canvasMain.AddChild(tbtn);
canvasMain.AddChild(line);
canvasMain.AddChild(cb);
canvasMain.AddChild(tb);
canvasMain.AddChild(border);
border.Child = stack;
stack.AddChild(stackBtn);
}
protected override void OnTick()
{
btn.Top += 10; //Correct, button is moving
tbtn.Top += 10; //Correct, tbutton is moving
border.Top += 10; //Correct, border is moving
cb.Top += 10; //Correct, checkbox is moving
tb.Top += 10; //Correct, textbox is moving
line.Y1 += 10; //WRONG, not moving
line.Y2 = line.Y1; //WRONG, not moving
}
Canvas canvasMain = new();
Button btn = new()
{
Top = 0,
Left = 0,
Text = "btn"
};
ToggleButton tbtn = new()
{
Top = 0,
Left = 50,
Text = "tbtn"
};
Border border = new()
{
Top = 0,
Left = 100,
BorderColor = Color.Red,
BorderThickness = 2
};
StackPanel stack = new()
{
Orientation = Orientation.Vertical
};
Button stackBtn = new()
{
Top = 0,
Text = "btnStack"
};
CheckBox cb = new()
{
Top = 0,
Left = 200,
Text = "cb"
};
TextBox tb = new()
{
Top = 0,
Left = 250,
Text = "tb"
};
Line line = new()
{
X1 = 0,
Y1 = 200,
X2 = 1000,
Y2 = 200,
StrokeThickness = 10,
StrokeColor = Color.Red,
};
}
}
@tomas.malukas.work
tomas.malukas.work
27 May 2024, 08:58 ( Updated at: 27 May 2024, 11:23 )
I'm glad and confirming that common issue “Parent StackPanel not being auto resized when child StackPanel.IsVisible=false” is solved. Now it works as expected.
cTrader Team rocks and hopefully next major release will come first through Unit Testings, at least! ;)
@tomas.malukas.work