hi,
I got a Chart (alClient) on some MDI form (MDiForm.Left > 0).
I want to maximize the MDI by double clicking on the chart, But it's provoc a zoom.
Any Idea how to avoid it?
thx in advance,
Zoom vs Double Click = Maximize
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mariano,
You can disable zoom and then enable it manually:
Or you can try doing something like this:
You can disable zoom and then enable it manually:
Code: Select all
Chart1.Zoom.Allow:=false;
Code: Select all
procedure TForm1.Chart1DblClick(Sender: TObject);
begin
if Chart1.Align=alClient then
Chart1.Zoom.Allow:=true
else
Chart1.Align:=alClient;
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 |
hi,
thanks, I didn't thought about this (simple) way...
it's work great.
thanks, I didn't thought about this (simple) way...
Code: Select all
procedure TFrmCompare.ChartDblClick(Sender: TObject);
begin
fDblClick := true;
fOldZoomAllow := Chart.Zoom.Allow;
Chart.Zoom.Allow := false;
// ...
end;
procedure TFrmCompare.ChartMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if fDblClick then begin
fDblClick := false;
Chart.Zoom.Allow := fOldZoomAllow;
end;
//...
end;