Jump to content


Photo

Multiselect and scrolling


  • Please log in to reply
4 replies to this topic

#1 GoustiFruit

GoustiFruit
  • Members
  • 82 posts

Posted 26 March 2018 - 08:48 PM

Hi Boki,

 

After a looooong time without programming, I'm back for some personal project with Delphi. And NextGrid :-)

 

So I'm trying to setup a NextGrid component on my form but I'm having a couple problems:

- First one (NextGrid used as a ReportGridView), if I set "MultiSelect" to True and run my project, as soon as I multi-select using the "Shift" key, I can't scroll the component anymore: it won't respond to mousewheel or mouse click on the scrollbar or keyboard up/down/page-up/page-down/home/end.

- Second, not a bug but a question/request: is it possible to change the scroll speed/increment ? For now the grid scrolls one item at a time when using the mouse wheel, I'd like to make it scroll more with the mouse.

 

Thanks.

 

PS: oh, and a small glitch I corrected in the source code, concerning the display of hints on column headers (currently the hint will show underneath the mouse cursor)... In NxGridView6:

procedure TNxGridView6.DoHeaderHintDelayTimer(Sender: TObject);
var
  Shift, PosX: Integer;
  CursorPos: TPoint;
  HintRect: TRect;
begin
  { Stop & Destroy }
  FreeAndNil(FHeaderHintDelayTimer);

  if Assigned(HoverHeader) and
    not (FHoverHeader = FPressedHeader) then
  begin
    { Create Hint Window }
    FHeaderHint := HintWindowClass.Create(nil);
    FHeaderHint.Color := clInfoBk;

    { Set Position & Activate }

    { Calculate Rect }
    HintRect := FHeaderHint.CalcHintRect(Screen.Width, HoverHeader.Header.Hint, nil);

    GetCursorPos(CursorPos);

    OffsetPoint(CursorPos, 16, 16);

    { Cordinates must be "Screen" }
    HintRect.TopLeft := CursorPos;

    HintRect.Bottom := HintRect.Top + HintRect.Bottom;
    HintRect.Right := HintRect.Left + HintRect.Right;

    { Show Hint }
    FHeaderHint.ActivateHint(HintRect, HoverHeader.Header.Hint);
  end;
end;


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,642 posts
  • Gender:Male

Posted 28 March 2018 - 09:40 PM

Hi,

I have fixed now scroll bug, but I'm not sure if I understand hint bug. Can you give me more details? I wanted to have hint appearing on that position.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 GoustiFruit

GoustiFruit
  • Members
  • 82 posts

Posted 28 March 2018 - 10:15 PM

Hi,

 

My screen capture tool didn't capture the mouse cursor as expected (capturing from KDE running Delphi on Windows XP in VirtualBox :-)) but here are two screenshots, hopefully you'll understand...

 

(in both cases the mouse cursor is supposed to be about at the bottom and in the middle of the "Distance" header)

 

- With my modification, the hint is displayed correctly at the bottom right of the cursor:

 

8b1ebb7e0bf59849e190bf12493aa4f2a92acf00

 

- With original code, the hint is displayed right under the header, but the mouse partially covers it (on the picture below, the mouse cursor is not on the correct position !)

 

c6e5bd6a66b56a0b5a316a66f85bb5649f083aa6



#4 Abner Doon

Abner Doon
  • Members
  • 27 posts
  • Gender:Male

Posted 15 April 2018 - 09:04 AM

> I have fixed now scroll bug

 

Hello Boki,

I use NextGrid v6.1.0 and I still have this annoying bug...
When do you publish the corrected version ?



#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,642 posts
  • Gender:Male

Posted 15 April 2018 - 12:46 PM

Hi,

I will do it in couple of days. Sorry for delay.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users