Removing Chart Panels
Hi,
I'm looking for a way to disable the 'Native Export' and 'Tools' tabs
from the Chart editor.
I know it is possible with the TChartEditor component itself, but I've
looked through the tech-tips and examples and having found anything
similiar within RB to disable these tabs when it displays the editor.
Anyone know a way to do this?
Thanks,
Brett
I'm looking for a way to disable the 'Native Export' and 'Tools' tabs
from the Chart editor.
I know it is possible with the TChartEditor component itself, but I've
looked through the tech-tips and examples and having found anything
similiar within RB to disable these tabs when it displays the editor.
Anyone know a way to do this?
Thanks,
Brett
This discussion has been closed.
Comments
The TeeChart component inside ReportBuilder is simply a wrapper around a
TeeChart component. You can access the TCustomChart object using the
TppTeeChart.Chart or TppDPTeeChart.Chart properties.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok. However, it's the chart editor I need to access, not the chart
component. Any ideas how to get access to this one?
Thanks,
Brett
ReportBuilder simply calls the EditChart procedure sending the chart
component to that method when the user wants to edit the chart. The
EditChart procedure is a TeeChart method which then creates a chart editor
for that chart component. As far as we know, there is no way to control the
editor at this time. You may try contacting Steema and see if they know of
any tricks to access this object.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok. I see how it is working now. It calls the EditChart procedure
which then creates the editor and displays it. No chance to do
anything. (It's nice to have source code!)
However, I found a way around it.
a) Include a uses TeeEditCh;
b) Put an OnActiveFormChange event on the screen object
just before you edit the report.
c) In the event:
if Screen.ActiveForm is TChartEditForm then
with Screen.ActiveForm as TChartEditForm do
begin
TabTools.TabVisible := false;
TabExport.TabVisible := false;
end;
d) When the editor returns, turn off the
Screen.ActiveFormChange event.
Thanks,
Brett