Not catching all mouse events with wxWidgets

后端 未结 1 1131
孤独总比滥情好
孤独总比滥情好 2021-01-15 17:20

Hi I am am trying to catch mouse movements for a MouseOver function in an app created with Code::Blocks using the wxSmith plugin. I have stumbled upon a puzzling problem.

相关标签:
1条回答
  • 2021-01-15 17:30

    I figured it out: whenever you have one child of a wxFrame, wxWidgets automatically assumes you want it to cover the entire area of the wxFrame.

    Because of this, there is no portion of the frame visible - hence none of the events make it to your handler.

    As for solutions, you could always have the wxPanel handle the events.

    Edit: Since you mentioned wxSmith, you could go to the events tab of the management pane {} and put the event handling code in the mouse events there instead of the wxFrame.

    0 讨论(0)
提交回复
热议问题