Viewport scrollbar unclickable



  • @Christoph-Hart Is it possible to add a mask under the scrollbar sections?

    When adding a child panel with mouse CB, the mouse event passes through the scrollbar instead of scrolling...
    Also, it doesn't look nice to see the panel graphics below the scrollbar...



  • You can override the appearance of the scroll ar since a few days... drawScrollbar is the name of the function.



  • @ustk I don't see an issue...

    Peek 2020-08-08 12-05.gif



  • @Christoph-Hart Oh yes I've seen that, cool!
    But my main issue is the mouse event...



  • @d-healey My panel is both larger and taller, so the mouse interaction is not overridden by the scrollbar and pass through it
    try to make your panel larger and click the vertical scrollbar. You'll see that it will select a menu entry instead of the scrollbar



  • @ustk Reduce the width of your panel by 10 pixels (or however wide your scrollbar is), that's what I did. You can't see that part of the panel anyway because it's behind the scroll bar. If you need to decorate it you can paint the panel that the viewport is in, that's how I got the grey outline for mine.



  • @d-healey @Christoph-Hart No I can't because it is a complex interaction, and I need the panel to be larger and taller than the viewport.

    Move and click in the panel over a scrollbar:

    HiseSnippet 995.3ocsVstaaaCElzIpM1cdqcX6+B8WJ.sFx81FPVwRisyfwVRMl6B5vVWACEsEQnHEjnRpPQ.1iPeQ561.1Cv1gh5VRLxRMvDfg04J+3gemC0rDEkklpRP3tuJOlgvely7boNbTHgKQSGivetyAjTMKw0pZu7XRZJK.gwa7CFE3tahJd9queOhfHorFUHzQJNk8S7HttQ6rc+QtPrOIf8JdTKuextSoJ4HkPkA3YCGeTLgdBYI6PhwsNNH7slDv0pj4ZhlkhvatmJHedn5Lo0+i3o7iELivPzbHQV06qDAFDazhFExEAyp12oHHKyZpBaXqBekyA7.ds9lpwcKL31DQ65Aty0Aug+2vyeUvC2BdaZg28blSS3w5FKFrcGmoR3fZAANBZCKqunNAcbFo.Oj5AQjSX6m.B0Q38Le+G39Te+s2oeu98fChTs6ojD2YDISLz84tUwtjoGohhURPv69Vy22FU+dVwAoL8Lnjo+YUllKYdKxjTMWI8Vtcu22q6xAK.FvKDBO6oc5.tLfSjIr.ShbgmklbXsV6zwhL1obkfoMdUlkIBAONk48a5Pd5f.hlL3ctOzcHraZzjWp4QE+dy16z6b32kg7AprT1HhPbLv6ZvL6TXmVfa9BWqz.pfSOAP66AbXfa4ek4pDEO205bjIuiAZvq2YE9keU+90K4WBK1TM8.L287BnWANWk7Pkl8RoWA.6cdO2KaZwhUZybblnDBVxJMaZMStt.8jYQGyRd.PRfikZGAN5EaBtyMqIfZYWsbTImJ45WFyJka2EWsqqr5ip2rsU0rGaqsXqsB2ZTc0tPTI62zOV5N3ptna7KK6FYAGwYmEqRzHdfocrRbHpnF0dtH5WlNFN7qRGjYX0hYIZtolgGC7bJy1r20YLK8DsJtv2xFOD9123E+c0KrKc27Zg+7228LdfNDgcv+MHGx3KC0FoOBRbMKpZTb2a8OviIlKffsrHne0vHCWsXw2xwxaMqrC9Of3xMu7cvKwjDH1VIoMPqgyGvsgyWCRPSo5rpVSnB8ENvzC2FEnqNjDFUqBxDD8Emeatzpz.vmuvfRyvPYJWm29RsOgg59236btov8dNy3ZZ3pwamUfW3H5+a7VdEYemIKVvn5Fvtoy9udcuO7S.J16TVd.QmvMDrCyhlCzTJCPhDncoFNSGSKqU12HapLyYxfBACatz3PiLtz3vJinHBMQ8VpsQ2bI7VEZ.LIK9VjtvGEAxt0c1NN9C7QQv2F7VJ0TJdHf8UGyiViXd7ZDySViXd5ZDyyViX9l0Hlu8Ziw7YYuHSqhrsIfhYSJlvhwSjDfkUvHQ+KH2i6mC
    

    I can make my own viewport with a panel but I'll lose the benefit of the mousewheel/trackpad...



  • what about making your own viewport using a panel? Or what about in the mousecallback you could ignore the click if the mouse position is over the scroll bar?



  • @d-healey ☺ I just edited my post above about that



  • @d-healey said in Viewport scrollbar vs mouse event issue:

    ...Or what about in the mousecallback you could ignore the click if the mouse position is over the scroll bar?

    Hmm.. worth to try that! but having an "event mask" would be much secure...



  • @d-healey @Christoph-Hart Nope, in fact, it doesn't work because the panel is considered above the scrollbar anyway.
    Let's not even talk about mouse events, but just place a panel that is both larger and taller, and you cannot click the scrollbar anymore...



  • @ustk said in Viewport scrollbar vs mouse event issue:

    Let's not even talk about mouse events, but just place a panel that is both larger and taller, and you cannot click the scrollbar anymore...

    Yep that's a problem.


Log in to reply
 

12
Online

752
Users

3.0k
Topics

24.9k
Posts