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

How to change the color of DBText when it is clicked

edited January 2008 in End User
Hello,

can you please explain how to change the color of DBText when user clicks on
it? This should work like select function. When user clicks on the DBText
line it changes the color, but if there were any other lines with changed
color, they should become white.

Best regards
Vytautas

Comments

  • edited January 2008
    Hi Vytautas,

    In my quick testing, it was possible to change the color of a text object
    from the OnDrawCommandClick event using a similar method to refresh the
    entire report as the AutoSearch feature uses. Below is the snip of code I
    used.

    procedure TForm1.ppLabel1DrawCommandClick(Sender, aDrawCommand: TObject);
    begin
    ppLabel1.Font.Color := clBlue;
    ppReport1.Reset;
    ppReport1.Engine.Reset;
    TppDrawText(aDrawCommand).RedrawPage := True;

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.