Page 1 of 1

PB with fullsreen

Posted: Tue Feb 16, 2010 11:16 am
by 10551078
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;

Re: PB with fullsreen

Posted: Tue Feb 16, 2010 11:33 am
by narcis
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;

Re: PB with fullsreen

Posted: Tue Feb 16, 2010 2:46 pm
by 10551078
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!

Re: PB with fullsreen

Posted: Tue Feb 16, 2010 3:06 pm
by narcis
Hi mivchart,

In that case you can enable the tool using another event not being chart's OnDblClick.

Re: PB with fullsreen

Posted: Tue Feb 16, 2010 3:17 pm
by 10551078
ok thank you,
I'll see later,it's non-blocking