TsMagnifier.Execute(x,y)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #35962
    Maximus Marius
    Participant

    I think it is BUG 😉

    var

    sMagnifier:TsMagnifier;

    When I call first time sMagnifier.Execute(x,y) position i OK (x,y).

    After sMagnifier.Hide

    I call sMagnifier.Execute(x2,y2)

    Second call Execute don't change position , still (x,y)

    Code:

    procedure TsMagnifier.Execute(x: integer = -1; y: integer = -1);
    var
    i: integer;
    begin
    if acMagnForm = nil then begin
    acMagnForm := TacMagnForm.Create(nil);

    ….
    if (x <> -1) or (y <> -1) then begin
    TacMagnForm(acMagnForm).Position := poDesigned;
    acMagnForm.Left := x;
    acMagnForm.Top := y;
    end;
    ….

    if IsModal then
    TacMagnForm(acMagnForm).ShowModal
    else
    TacMagnForm(acMagnForm).Show;
    end
    else begin

    ////// correct position FIX !!!
    if (x <> -1) or (y <> -1) then begin
    TacMagnForm(acMagnForm).Position := poDesigned;
    acMagnForm.Left := x;
    acMagnForm.Top := y;
    end;[/color]
    //////

    if not TacMagnForm(acMagnForm).Visible then begin
    SetFormBlendValue(TacMagnForm(acMagnForm).Handle, nil, 0);
    if IsModal then
    TacMagnForm(acMagnForm).ShowModal
    else
    TacMagnForm(acMagnForm).Show;
    end;
    TacMagnForm(acMagnForm).BringToFront;
    end;
    end;

    #51310
    Support
    Keymaster

    Thank you for your research, I will add this code very soon.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.