I have application, just panel and statictext on it. I have two event, one is generated when user move mouse over panel, second when user move mouse over statictext. They both work, i know that becouse i send message to console when mouse is over static text and second when mouse is over panel. Now, when mouse is over static text in event function i change cursor to wxCursorHand, when over panel to wxNullCursor. It works fine but when I open another window (child dialog with show modal) and close it i always have wxNullCursor. Its strange, besause on console I have still correct messages. Code of my event functions:
Code: Select all
void myFrame::on_mouse_move(wxMouseEvent& event)
{
wxLogMessage("over panel");
my_panel->SetCursor(wxNullCursor);
event.Skip();
}
void statictext::on_mouse_over(wxMouseEvent& event)
{
wxLogMessage("over text");
GetParent()->SetCursor(wxCursor(wxCURSOR_HAND));
event.Skip();
}
Thanks