Temporarly disable scrolling

Hi,

I have the following problem:

We are implementing a kind of settings page for some parameters in a table like arragement (one setting per row).

Some setting types are represented as a "slider" implemented using the pres/motion/release events to move the slider handle.

Now, the layer which holds the settings rows is scrollable..

The problem now is that I would like to disable the scrolling once the slider handle has been "pressed" and re-activate the scrolling once the slider handler has been released.

The other idea I had was to mark the motion event as "handled" in the LUA callback of slider motion event, but I did not find if this is possible either.

An tips how I can achive this?

Thanks,

Martin

0

Comments

2 comments
  • Official comment

    Just to update this post.  With Storyboard 6.2 there is now a new parameter for the Lua API gre.set_layer_attrs() that allows you to enable and disable scrolling:

    -- Turn layer scrolling off ...

    gre.set_layer_attrs(layer_name, { scroll_enabled = false }

    -- Turn layer scrolling on ..

    gre.set_layer_attrs(layer_name, { scroll_enabled = true }

    This works for table scrolling as well through gre.set_table_attrs().  Both functions however are only available if scrolling on the layer or table has been indicated during design time.

    Comment actions Permalink
  • Hi Martin,

    Have you considered using a control above your scrolling area that will block incoming events (press|release|motion)?  


    By default controls are set to "Stop Events", this will prevent event propagation to UI elements below the control.  This blocking control doesn't need to have any render extensions, so it will not visually contribute anything into the UI.  You can toggle the control's visibility when you want to block/unblock incoming events.

    On a positive side note, the ability to enable/disable scrolling dynamically at run-time has already been added to scrolling layers and tables by default in our upcoming version of Storyboard.  Stay tuned for updates!

    Cheers,
    Mike

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post