
When I make a zoom, I would like to trace a selection rectangle on the canvas of the graph. Here is a picture :
http://cjoint.com/?cimhAKO5v7
TIA !
Cordially,
Rodrigue
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
![]() ![]() ![]() ![]() ![]() ![]() |
Instructions - How to post in this forum |
Code: Select all
void __fastcall TForm1::Chart1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if(Shift.Contains(ssLeft))
{
XStartPos = X;
XStopPos = X;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chart1MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
if(Shift.Contains(ssLeft))
{
XStopPos = X;
Chart1->Invalidate();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chart1BeforeDrawAxes(TObject *Sender)
{
Chart1->Canvas->Rectangle(XStartPos, Chart1->LeftAxis->IStartPos, XStopPos, Chart1->LeftAxis->IEndPos);
}
//---------------------------------------------------------------------------
You can do it before drawing the rectangle setting Canvas Pen and Brush colors as:Where to specify the color of the background rectangle selection who is draw when we zoom?
Code: Select all
void __fastcall TForm1::Chart1BeforeDrawAxes(TObject *Sender)
{
Chart1->Canvas->Pen->Color=clRed;
Chart1->Canvas->Brush->Color=clBlue;
Chart1->Canvas->Rectangle(XStartPos, Chart1->LeftAxis->IStartPos,
XStopPos, Chart1->LeftAxis->IEndPos);
}
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
![]() ![]() ![]() ![]() ![]() ![]() |
Instructions - How to post in this forum |
Code: Select all
Chart1->Zoom->Brush->Color = clBlue;
Code: Select all
Chart1->DoubleBuffered = true;
I'm afraid there's no solution by now. I've included it on our wish list to be considered for future releases.I've a problem of blink now !
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
![]() ![]() ![]() ![]() ![]() ![]() |
Instructions - How to post in this forum |