I am using Cbuilder6 with TChartPro 7.07
With the TChart, i need to use the OnExit event to hide some popup text when the mouse moves off the chart. (I have multiple Area series on the chart)
The OnExit and also the OnEnter events never get activated
This is easy to reproduce, just create these events and set a break point using the bebugger in the OnEnter or OnExit events
This not a biggie, just want the app to look a bit cleaner
OnEnter and OnExit events dont work
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bugsie,
Yes, this is a known issue(TV52011492) with a high-priority on our defect list to be fixed for future releases.
In the meantime you can simulate those events doing something like this:
Yes, this is a known issue(TV52011492) with a high-priority on our defect list to be fixed for future releases.
In the meantime you can simulate those events doing something like this:
Code: Select all
void __fastcall TForm1::FormMouseMove(TObject *Sender, TShiftState Shift, int X,
int Y)
{
if (MouseOnChart)
{
MouseOnForm=true;
MouseOnChart=false;
Chart1->Title->Text->Clear();
Chart1->Title->Text->Add("Exit Chart");
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chart1MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
if (MouseOnForm)
{
MouseOnChart=true;
MouseOnForm=false;
Chart1->Title->Text->Clear();
Chart1->Title->Text->Add("Enter Chart");
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
MouseOnChart=false;
MouseOnForm=true;
}
Best Regards,
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello everyone,
Sorry for the confusion, Mariano is right. For those events to work the chart needs the focus. When it has the focus then all OnKeyxxxx events also work:
Regarding Bugsie's request, we could add OnMouseEnter and OnMouseExits events.
Sorry for the confusion, Mariano is right. For those events to work the chart needs the focus. When it has the focus then all OnKeyxxxx events also work:
Code: Select all
procedure TForm1.Chart1Enter(Sender: TObject); begin
Color:=clWhite;
end;
procedure TForm1.Chart1Exit(Sender: TObject); begin
Color:=clBtnFace;
end;
procedure TForm1.Button1Click(Sender: TObject); begin
Chart1.SetFocus;
end;
procedure TForm1.Chart1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
Caption:=IntToStr(Key);
end;
Best Regards,
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 |