Bug Report T120332
Visible to All Users

The grid unexpectedly continues to scroll its content after the mouse pointer is moved away and then returned back to hover the scrollbar's button

created 11 years ago

Hello,

Since we upgraded from EQ 6 to VCL 13.2.5, we have a strange issue with CxgridDBTableView, ONLY if Tdataset.AfterScroll contains code that takes time and contains application.processmessages. Grid scrolls uncontrolled and Scrollbar button stays in pressed state, until BOF or EOF is reached.

With EQ 6, we did not have this issue.

Iv there a way to stop Grid View Scrolling from TDataset.AfterScroll?

Regards, Ronald

Show previous comments (3)
DevExpress Support Team 11 years ago

    I kindly ask you to provide a small sample project. This will let us examine it on our side and check with different versions of our controls. Here is an algorithm I personally use to localize a problem in a large project. Reset all event handlers in your application (except AfterScroll). If the problem disappears, set them back one by one, and see when the problem returns. If this does not help, remove all controls one by one and test your sample at each step until the problem is gone. As a result, you will have a small sample illustrating the issue.

      Hi Paulo,
      Please find attached a modified version of gridmodedemo,. I modified tvOrder.DataController.DataSource.DataSet.AfterScroll event procedure so that for each order, an html-file is loaded, which takes time, whicht leads to uncontrolled scrolling.
      Reproduction: start exe, open orders for fist car, click on <down> arrow of orders scrollbar and watch the app scrolling until the last order has reached.
      In my first message, I linked behavior to application .processmessages, but later, I found that the fact that a scroll handler takes time causes the behavior.
      Regards, Ronald

      [Attachment is removed by DevExpress because of the private data]

      DevExpress Support Team 11 years ago

        Hello,

        Thank you for your sample project. I have reproduced the described behavior without using the HTML editor and forwarded this ticket to our developers for research.

        Answers approved by DevExpress Support

        created 11 years ago (modified 11 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Show previous comments (4)
          DevExpress Support Team 11 years ago

            Please try the following fix in addition to the VCL 13.2.6 changes:

            Delphi
            cxGridCustomView.pas: procedure TcxGridSite.WndProc(var Message: TMessage); function IsUnwantedMouseMessage: Boolean; begin if Locked then begin case Message.Msg of WM_MOUSEFIRST..WM_MOUSELAST, WM_MOUSEHOVER, WM_MOUSELEAVE: begin Result := True; if (Message.Msg = WM_LBUTTONUP) and (ScrollBarsManager <> nil) and ScrollBarsManager.IsCapture then ScrollBarsManager.HandleMessage(Message); end; else Result := False; end; end else Result := False; end; begin if IsUnwantedMouseMessage then Exit; Controller.WndProc(Message); inherited WndProc(Message); end; cxControls.pas: TcxControlScrollBarsManager = class(TcxIUnknownObject, IcxMouseTrackingCaller, IcxMouseTrackingCaller2) private FIsCapture: Boolean; FHotScrollBar: TcxControlScrollBarHelper; FOwner: TcxControl; FScrollBars: TList; function GetScrollBars(AIndex: Integer): TcxControlScrollBarHelper; procedure SetHotScrollBar(AValue: TcxControlScrollBarHelper); procedure SetIsCapture(AValue: Boolean); protected function ProcessMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer): Boolean; virtual; function ProcessMouseMove(Shift: TShiftState; X, Y: Integer): Boolean; virtual; function ProcessMouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer): Boolean; virtual; // IcxMouseTrackingCaller procedure MouseLeave; // IcxMouseTrackingCaller2 function PtInCaller(const P: TPoint): Boolean; property HotScrollBar: TcxControlScrollBarHelper read FHotScrollBar write SetHotScrollBar; property ScrollBars[Index: Integer]: TcxControlScrollBarHelper read GetScrollBars; public constructor Create(AOwner: TcxControl); virtual; destructor Destroy; override; function HandleMessage(var Message: TMessage): Boolean; virtual; function IsScrollBarsArea(const APoint: TPoint): Boolean; virtual; procedure Paint(ACanvas: TcxCanvas); virtual; procedure RegisterScrollBar(AScrollBar: TcxControlScrollBarHelper); procedure UnRegisterScrollBar(AScrollBar: TcxControlScrollBarHelper); property IsCapture: Boolean read FIsCapture write SetIsCapture; end;

              Works, thanks!

              DevExpress Support Team 11 years ago

                Thank you very much for your testing and feedback

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.