PB with fullsreen

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mivchart
Newbie
Newbie
Posts: 31
Joined: Thu Dec 04, 2008 12:00 am

PB with fullsreen

Post by mivchart » Tue Feb 16, 2010 11:16 am

I use the component Fullscreen and it works.
The PB is that after fullscreen a rectangle activated Zoom! I tried the "UndoZoom" but nothing

my code at run time :

//if not find fullscreen tools > create at run time (not necessary)
if not assigned(ScreenMax) then
ScreenMax:= AChart.Tools.Add(TFullScreenTool.Create(AForm)) as TFullScreenTool;

//if tools fullscreen > force dysplay
if assigned(ScreenMax) and not ScreenMax.Active then begin
ScreenMax.ShowInEditor :=false;
AChart.undoZoom;
ScreenMax.Active :=True;
Application.ProcessMessages;
end;

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: PB with fullsreen

Post by Narcís » Tue Feb 16, 2010 11:33 am

Hi mivchart,

That occurs when enabling the tool in OnDblClick event, doesn't it? If that's the case you can do something like this:

Code: Select all

procedure TForm4.Chart1DblClick(Sender: TObject);
begin
  ChartTool1.Active:=not ChartTool1.Active;
end;

procedure TForm4.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if not ChartTool1.Active then
    Chart1.Zoom.Allow:=False;
end;

procedure TForm4.Chart1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if ChartTool1.Active then
    Chart1.Zoom.Allow:=True;
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
Image Image Image Image Image Image
Instructions - How to post in this forum

mivchart
Newbie
Newbie
Posts: 31
Joined: Thu Dec 04, 2008 12:00 am

Re: PB with fullsreen

Post by mivchart » Tue Feb 16, 2010 2:46 pm

It 's ok if you have Tools create in developpment.
But in my case, the tools is create at run time. i don't know the name tools ! and it''s no généric for all chart in my application!

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: PB with fullsreen

Post by Narcís » Tue Feb 16, 2010 3:06 pm

Hi mivchart,

In that case you can enable the tool using another event not being chart's OnDblClick.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

mivchart
Newbie
Newbie
Posts: 31
Joined: Thu Dec 04, 2008 12:00 am

Re: PB with fullsreen

Post by mivchart » Tue Feb 16, 2010 3:17 pm

ok thank you,
I'll see later,it's non-blocking

Post Reply