TextEditor::isMouseOver() doesn't work?


#1

It seems that it doesn’t work. Just add a TextEditor anywhere and try it, always is false :S


#2

The text editor uses subcomponents, so the mouse isn’t over the text editor itself, it’s over one of its children.


#3

Thanks, I’ll make a workaround then.


#4

Try using this function:

void Component::addMouseListener (MouseListener* newListener,
                                                       bool wantsEventsForAllNestedChildComponents);

with wantsEventsForAllNestedChildComponents = true.


#5

Uhmm that function is very interesting, thanks for the tip!! :slight_smile: