Page 1 of 1

scrolling a group with the mouse wheel

Posted: Mon Oct 21, 2019 10:06 am
by babas66
Hello,

i am looking for a method to scroll a group with the mouse wheel. I have find some ideas in this forum using the handler rawKeyDown but the result is not really useful : it's working but is not a smooth scrolling.
Considering that the scrolling work well in dataGrid, I suppose that is possible to make a smooth scrolling in a group... but I've no idea how :oops:

Someone know if it's possible or the best way is using datagrid ?

Regards,

Seb

Re: scrolling a group with the mouse wheel

Posted: Mon Oct 21, 2019 11:41 am
by jmburnod
HI seb,
Magic word is rawkeydown
Something like that:

Code: Select all

local sCurScroll
on rawkeydown pRawKey
   put "65309,65308" into tLesK
   if pRawKey is in tLesK then
      put 24 into tEmpan
      if sCurScroll <> empty then
         if the mouseloc is within the rect of group sCurScrollGr then
            if pRawKey = 65308 then
               put tEmpan into tSec
            end if
            if pRawKey = 65309 then
               put (0-tEmpan) into tSec
            end if
            set the vscroll of group sCurScrollGr to (the vscroll of group sCurScrollGr)+tSec
         end if
      end if
   else
      pass rawkeydown
   end if
end rawkeydown
Best regards
Jean-Marc

Re: scrolling a group with the mouse wheel

Posted: Mon Oct 21, 2019 1:34 pm
by richmond62

Re: scrolling a group with the mouse wheel

Posted: Mon Oct 21, 2019 1:38 pm
by babas66
Hi Jean-Marc,

thanks you very much for your answer.
This handler work very well ! I have to make some changes to work with scrolling fields in group but the result is very fine !

Best regards,
Seb

Re: scrolling a group with the mouse wheel

Posted: Mon Oct 21, 2019 1:42 pm
by babas66
Interessing method, I haven't seen this post before but I thought something like this, if I can't find a good way to use the mouse wheel.

Seb