Gettig the current selected Component while desiging.
Hi,
I have a report and a Designer on my form. Now I want to get the current
selected component if I'm designing the report. I tryed things like
if ppReport1.ComponentDesigner.CurrentComponent <> nil then begin
if ppReport1.ComponentDesigner.CurrentComponent is TppLabel then begin
//Do something
end;
end;
But CurrentComponent is the report itself. How can I get the selected
component in the designer?
--
Mit freundlichen Gr??en
Sven Langenkamp
Tel.: +49 (0) 50 21 / 97 24 -15
Email: langenkamp@ctdatentechnik.de
===============================
CT Datentechnik Gesellschaft
f?r Prozessrechentechnik mbH
Eschenstr. 2 - 31582 Nienburg
Tel.: +49 (0) 50 21 / 97 24 -0
Fax: +49 (0) 50 21 / 97 24 -18
Email: info@ctdatentechnik.de
Internet: www.ctdatentechnik.de
===============================
I have a report and a Designer on my form. Now I want to get the current
selected component if I'm designing the report. I tryed things like
if ppReport1.ComponentDesigner.CurrentComponent <> nil then begin
if ppReport1.ComponentDesigner.CurrentComponent is TppLabel then begin
//Do something
end;
end;
But CurrentComponent is the report itself. How can I get the selected
component in the designer?
--
Mit freundlichen Gr??en
Sven Langenkamp
Tel.: +49 (0) 50 21 / 97 24 -15
Email: langenkamp@ctdatentechnik.de
===============================
CT Datentechnik Gesellschaft
f?r Prozessrechentechnik mbH
Eschenstr. 2 - 31582 Nienburg
Tel.: +49 (0) 50 21 / 97 24 -0
Fax: +49 (0) 50 21 / 97 24 -18
Email: info@ctdatentechnik.de
Internet: www.ctdatentechnik.de
===============================
This discussion has been closed.
Comments
Instead of using the Report.ComponentDesigner, you will need to use the
Designer.OnSelectionChange event. This event sends you a list of the
currently selected components in the designer. You can then use this list
to extract the components and do what ever you like with them.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com