irigsoft Posted January 17, 2018 Share Posted January 17, 2018 Hi, We use OnMouseUp as function to Show SmallForm with mouse coordinates. But a problem ocure. When click on Title, ScrollBars (Out of Body) we show SmallForm How can show SmallForm with Mouse cordinates by BodyClick ? I dont want to show Screen mast when click on DBGrid scroll. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 17, 2018 Share Posted January 17, 2018 Hi, Can you make a simple test case for this? Or how can we reproduce? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted January 17, 2018 Author Share Posted January 17, 2018 When I use uniDBGrid.OnMouseUp and click on ScrollBar its activate Form.ScreenMask, If I use uniDBGrid.OnClick and click on ScrollBar its not activate Form.ScreenMask. I replace uniDBGrid.OnMouseUp with uniDBGrid.OnClick, but If I want to use uniDBGrid.OnMouseUp, how to determinate when Mouse.Up Is on BODY? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted January 17, 2018 Author Share Posted January 17, 2018 Can I check this with delphi code: uniDBGrid.OnMouseUp (); begin UniMainModule.IsOnDBGridBody := (X < TUniStringGrid (Sender).ScrollBar.Left) AND (Y > TUniDBGrid (Sender).Title.Hight) AND (Y < (TUniDBGrid (Sender).Pages.Top + TUniStringGrid (Sender).ScrollBar.Top)) If not UniMainModule.IsOnDBGridBody then exit; end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 17, 2018 Share Posted January 17, 2018 Ok, I will check it a bit later and let you know... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 17, 2018 Share Posted January 17, 2018 Hi, I'm sorry, seems I do not quite understand the question Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 17, 2018 Share Posted January 17, 2018 Can I check this with delphi code: uniDBGrid.OnMouseUp (); begin UniMainModule.IsOnDBGridBody := (X < TUniStringGrid (Sender).ScrollBar.Left) AND (Y > TUniDBGrid (Sender).Title.Hight) AND (Y < (TUniDBGrid (Sender).Pages.Top + TUniStringGrid (Sender).ScrollBar.Top)) If not UniMainModule.IsOnDBGridBody then exit; end; This code is not very clear to me Quote Link to comment Share on other sites More sharing options...
irigsoft Posted January 17, 2018 Author Share Posted January 17, 2018 It is just simple, when I click on DBGrid.Body I want to know Mouse coordinates. At this moment, I get Mouse Coordinates by OnMouseUp But this create a problem for me: MouseUp get Coordinates event I click on DBGrid ScrollBar Quote Link to comment Share on other sites More sharing options...
irigsoft Posted January 17, 2018 Author Share Posted January 17, 2018 Problem is: when I get Mouse coordinates execute a long time procedure. and Form show Screen mask , this is exact way I want to work. But If table have more rows User must use scrollbar to move to the record when click on ScrollBAr activate longtime Procedure. 1. If User want to use scrollbar must wait procedure 2. If User click on DBGrid Tittle longtime procedure start 3. If click on Page buttons - longtime procedure start Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.