"consume mouse wheel" problem
You can set "Consume Mouse Wheel" directly in the details panel like this:
If you are creating the scroll box at run time, setting this requires a custom scroll box class. For some reason, the dev team never exposed a "Set Consume Mouse Wheel" function to blueprints, which means you cannot dynamically set it at run time.
To get around this, you can create a custom scroll box object, disable "Consume Mouse Wheel" by default, and use that object instead.
1) In the content browser, right click -> Selelct "New Blueprint Class".
2) Expose all classes and search for "Scroll Box"
3) Open the widget class you have just created and set the default value for "ConsumeMouseWheel"
4) Go back to your main widget blueprint graph. Instead of creating the normal scroll box, create an instance of your object instead. Right-click -> Construct object from class -> Select your custom class
Do a simple print just to test:
Note you can also use your custom scroll box in the widget designer as well. Just search for it in your pallet.
I hope this helps.
Good luck! :)
answered Mar 26 '19 at 11:37 PM
Thanks so much for the answer Alekann01 !
I really appreciate your great answer. But i need to change the"Set Consume Mouse Wheel" dynamic . For example in my level BP i have added "Any key" event .Also I have Widget with scrollBox with few buttons . If i use mouse wheel in the scrollBox i get key info from "Any Keys" only on the top and end of the scroll Box. But if i set "Set Consume Mouse Wheel" to be never and use scroll with mouse wheel i always getting key info from "Any Key " event .
BTW: I try to make key binds option in UE 4.14 And when i click on the button in the scrollBox i want "Any key" event to detect mouse wheel .
I hope all this make sens
Thanks alot !
Thanks again ! . I try some of the things that you recommended with the visibility and i get the result that i wanted .
Thanks so much
answered Mar 27 '19 at 10:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here