How to make a scrollable text in text field?

I have lengthy text (dynamic, not input) that inside a multilne and wraptext Text Field that should be scrollable with mouse wheel or maybe with a click in a slider bar with arrows up or dow on the left if that’s how it appears. How can one do it?

And if a small icon (bitmap data/ bitmap image) is displayed near a text can it also be scrolled along w the text?

Im not sure what events and imports are needed for haxe OpenFL project to do this other than the text field stuff of course

In the Flash target, this is enabled if mouseWheelEnabled is set to true (which it is by default).

For targets where it doesn’t work out of the box, you could add an event listener for MouseEvent.MOUSE_WHEEL to the TextField and then check the event’s delta value. Multiply the delta value by however many lines you want it to scroll and then adjust the TextField’s scrollV property.

Keep in mind that some targets/browsers give a different delta value for MOUSE_WHEEL events and that a TextField’s scrollV starts at 1, not 0.