Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Gettig the current selected Component while desiging.

edited November 2003 in General
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
===============================

Comments

  • edited November 2003
    Hi,

    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2003
    Thanks, workes great.


This discussion has been closed.