TsPageControl MouseDown

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #37832
    Lasse
    Participant

    The latest changes in TsPageControl.WndProc did break MouseDown in page control tabs. I think inherited is needed here (this code is starting about line 1817):

    Code:

    if Page <> ActivePage then
    begin
    if SkinData.Skinned and SkinData.SkinManager.AnimEffects.PageChange.Active then begin
    sVCLUtils.PrepareForAnimation(Self);
    ActivePage := Page;
    sVCLUtils.AnimShowControl(Self, SkinData.SkinManager.AnimEffects.PageChange.Time);
    end
    else
    ActivePage := Page;
    end
    else
    inherited; <= This is needed Exit;

    And there is a similar code little later after that and it has the same issue.

    #57922
    Support
    Keymaster

    Hello!

    This issue will be solved in the v13.13 at the nearest days.

    #57938
    Lasse
    Participant

    This is still broken in version 13.13.

    I see why. If page control's MouseDown is overrided, it is never called.

    Code:
    procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override;

    There is now OnMouseDown called:

    Code:
    if Assigned(OnMouseDown) then
    OnMouseDown(Self, mbLeft, GetShiftState, TCMHitTest(Message).XPos, TCMHitTest(Message).YPos);

    Works, if I change that to

    Code:
    MouseDown(mbLeft, GetShiftState, TCMHitTest(Message).XPos, TCMHitTest(Message).YPos);

    That will call the OnMouseDown

    Code:
    procedure TControl.MouseDown(Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer);
    begin
    if Assigned(FOnMouseDown) then FOnMouseDown(Self, Button, Shift, X, Y);
    end;

    Same thing with the MouseUp

    Code:
    procedure TControl.MouseUp(Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer);
    begin
    if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, X, Y);
    end;
    #57949
    Support
    Keymaster

    Hello!

    These changes added in the v13.14, you can check it now.

    #57959
    Lasse
    Participant

    Yes, my MouseDown problem is fixed but if somebody is overriding MouseUp there is still exactly same issue with it. OnMouseUp is called instead of MouseUp.

    #57982
    Support
    Keymaster

    The issue with MouseUp overriding will be solved in the v13.15

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