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

Cut and Paste

edited December 2005 in RAP
Why does cut and paste not work in the Calc tab. Or am I missing something.

Comments

  • edited December 2005
    Hi Rob,

    The cut and paste options are available in the calc tab code editor, however
    note that it not possible to cut or copy the greyed out text representing
    the signiture of a routine.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2006
    Hi,

    The scenario here is - we embed TppDesignerWindow in our main form, and
    the menu of TppDesignerWindow is gone (we decided not to merge it with our
    main form's menu). Now we need to COPY and PASTE in Calc tab. We use looping
    to go through all menu items in TppDesignerWindow to find out the COPY and
    PASTE menu items. Then call aMenuItem.Click to trigger copy and paste. It
    works fine in Design tab. But it doesn't work in Calc tab.
    Now the question is: how to COPY/CUT and PASTE in this scenario?

    Bin

  • edited January 2006
    Hi Bin,

    You will need to get access to the RAP design module in order to control the
    code editor. This can be done by looping through the pages of the designer
    page control and access the Tag property where the design module is kept.
    Then you can use the TraCodeManager.CodeEditor to access the various
    commands such as Copy, Paste etc. Something like the following...

    uses
    ppEndUsr, ppDsIntf, ppDsgner, raIDE, raEdit;
    ...

    var
    lDesignModule: TppDesignModule;
    lCodeManager: TraCodeManager;
    lCodeEditor: TraCodeEditor;
    lPageControl: TPageControl;
    liIndex: Integer;
    begin

    lPageControl := ppDesigner1.Notebook;

    for liIndex := 0 to lPageControl.PageCount - 1 do
    begin
    lDesignModule := TppDesignModule(lPageControl.Pages[liIndex].Tag);

    if lDesignModule is TraCodeManager then
    lCodeManager := TraCodeManager(lDesignModule);
    end;

    lCodeEditor := lCodeManager.CodeEditor;

    --
    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.