I am Coder of the Month
Posted 25 Dec 2008 by Akinwale Ariwodola
I think it's pretty awesome (TM) that I became TopCoder Coder of the Month for the component development competitions! Look for me on the left side of the TC homepage and be sure to read my interview. And no one's allowed to make fun of my mugshot.
Happy Holidays!
Digg this |
Permalink |
Comments (1) |
Post A Comment
Prevent the Flex TextArea from intercepting the mouse wheel event
Posted 9 Dec 2008 by Akinwale Ariwodola
Life has just taught me a lesson. Do not encounter problems that people have rarely experienced.
I have a story to tell. I had a TextArea in a VBox which prevented the container from vertically scrolling if the mouse cursor was over the TextArea. The vertical scrolling worked fine when the mouse cursor was over other parts of the container. After spending several hours on Google looking for how to fix this and coming across only a couple of solutions (this and this) which did not work, or maybe my Google fu just plain sucks, I decided to roll my own.
After doing a bit of digging, following the approach in the second solution, I discovered that the TextArea has a mouseWheelHandler event handler defined. All I had to do was remove the event listener like so:
package
{
import mx.controls.TextArea;
public class MultilineText extends TextArea
{
override protected function createChildren():void
{
super.createChildren();
removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
}
}
}
Problem Solved. This occurred in an AIR app, though. I haven't bothered to test this in Flash Player and I really don't feel like it. Hopefully, this helps someone who encounters something like this in the future.
Digg this |
Permalink |
Comments (12) |
Post A Comment