Hello,
I have array of Component
. I want to use all Component
features, but I want to make all of them to not listen any mouse events. So I wonder if it’s ok to call in my Component
constructor removeMouseListener(this);
Like that:
class MyComponent : public Component
{
public:
MyComponent() { removeMouseListener(this); };
};
I want to do that because I want to use only parent Component
as a mouse listener. Of course I know I can call in MyComponent::addMouseListener(&parentComponent);
And then I will get all mouse events from MyComponent
in ParentComponent
. But in that case MyComponent
will also receive mouse events, but I don’t need them inside MyComponent
, it’s only cause not needed calling MyComponent::mouseEnter()
, MyComponent::mouseDrag()
, etc.