Hello,
I am developing a custom indicator.
ChartCustomDraw.ReDraw() works fine when called from
CalcBar() or from OnMouseEvent().
I have a ChartToolBar too containing several buttons; when I click a button
I enter into functions like this:
private void button1_Clear_Levels(object sender, EventArgs e)
{
ChartCustomDraw.ReDraw();
}
The problem is that ChartCustomDraw.ReDraw() is not fired when called from event functions.
Tx
ChartCustomDraw.ReDraw() not fired from event functions
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: ChartCustomDraw.ReDraw() not fired from event functions
Hello gbulle,
That is expected behavior. ChartCustomDraw.ReDraw() can only be called from the main calculation thread, while ChartToolBar will call the button1_Clear_Levels function in a different thread.
That is expected behavior. ChartCustomDraw.ReDraw() can only be called from the main calculation thread, while ChartToolBar will call the button1_Clear_Levels function in a different thread.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: ChartCustomDraw.ReDraw() not fired from event functions
You can do that.I can raise a flag and use a timer ?