Using TsScrollBox.OnGesture()

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36875
    Robovideo
    Participant

    Hello

    I am building an application for touchscreen using TsScrollBox component.

    I have noticed a couple of things, I'm not sure if the list below requires patching inside component source, hope you can help me.

    – I have enabled pan interactive gesture for TsScrollBox.

    When trying to pan inside the scroll box, it works fine. However the scrollbar does not update position.

    This happens when skin is enabled and scrollbars are skinned. In order to workaround I had to call UpdateScrollBars() inside

    the pan gesture assigned to the scrollbox:

    Code:

    procedure TForm4.PanelGesture(Sender: TObject;
    const EventInfo: TGestureEventInfo; var Handled: Boolean);
    begin
    if EventInfo.GestureID = igiPan then begin
    UpdateScrolls(sScrollBox1.ListSW, True);
    end;
    end;

    – Having

    Code:
    sScrollBox1.AutoMouseScrollWheel:=TRUE;
    sScrollBox1.VertScrollBar.Tracking:=TRUE;

    prevents the pan gesture to be processed. How is it possible

    to have both pan gesture and AutoMouseScrollWheel working at the same time?

    – OnGesture() event for TsScrollBox is not published, it needs manual assignment eg:

    Code:
    procedure TForm4.FormCreate(Sender: TObject);
    begin
    sScrollBox1.OnGesture:=PanelGesture;
    end;

    I am using Delphi XE w/AlphaSkins 10.26 on Win7

    Thanks

    #54753
    Support
    Keymaster

    Hello!

    I will add OnGesture event and automatic updating of scrolls in the nearest release.

    If you have a test application which I can use for tests, give it, please.

    #51068
    Robovideo
    Participant
    'Support' wrote:

    Hello!

    I will add OnGesture event and automatic updating of scrolls in the nearest release.

    If you have a test application which I can use for tests, give it, please.

    Hello

    please forget the supposed problem with TsScrollBox.AutoScrollWheel:=TRUE preventing pan gesture

    to be processed. I hadn't properly tested it, it is indeed possible to have both pan gesture and AutoScrollWheel

    working at the same time.

    I have attached an example for testing scrollbar update refresh during pan gesture in case you still need it.

    #54802
    Support
    Keymaster

    I can't test a panning gesture, unfortunately, I have a mouse only.

    I think, it will work in the next release.

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