0

我在 wxpython 中遇到了麻烦。我想知道如何在看起来像静态文本的对话框上生成文本,但是当您单击它时,它会运行一个事件。有谁知道我怎么能做这样的事情?

4

1 回答 1

1

I would use the mouse click events, like wx.EVT_LEFT_DOWN or wx.EVT_LEFT_UP along with the static text widget's HitTest method. So in your mouse event handler, you would want to call HitTest and use it to determine if you clicked within the static widget. See the following documentation for additional information:

于 2013-10-21T13:32:58.203 回答