Send To Back / Bring To Front on RunTime

Hello i'm using Fastreport 4.9.89, and i create dynamic TFrxMemoView..... i must doing an equivalent of "Right Click", "Send To Back" after my MemoView was created ...

In Delphi i can call a method SendToBack or BringToFront .... but not working in my fastreport script

FrxShapeView := TFrxMemoView.create(GroupFooter1);                           
MemoView.color := <UIBQuery2."COLOR">;
MemoView.top := TopPosition[Index];
MemoView.left := 134 + ((Index-1) * 1) + ((Index-1) * 112);
MemoView.height := 10;
MemoView.width := 111;
MemoView.BringToFront;

Can anyone can help me ... thank

Comments

  • gpigpi
    edited 5:09PM
    I think you should create user function with SendToBack or BringToFront functionality
  • gpigpi
    edited 5:09PM
    wrote:
    I tried to duplicate the issue. But creating a user function still doesn't fix it.
    Show your code here
  • edited 5:09PM
    I had to create this to bring certain components to the front and I created the method below...apologies it's not all the code but I'm hoping it does help someone along the way :-)

    I noticed that when you use the bring to front option on the context menu, all that happens is that in the XML, the position of the tags are restructured.
    So I thought I would do the same in code and it seems to work for me.

    // Force the picture view to the front (There is no Bring to Front function)
    if (Assigned(vBand)) then
    begin
    vIndex := vBand.Objects.IndexOf(vPictureView);
    if (vIndex <> (vBand.Objects.Count - 1)) then
    begin
    vBand.Objects.Exchange(vIndex, vBand.Objects.Count-1);
    end;
    end;

Leave a Comment