wxWidgets EVT_KILL_FOCUS

Posted by Wallter on Stack Overflow See other posts from Stack Overflow or by Wallter
Published on 2010-04-21T02:47:31Z Indexed on 2010/04/21 2:53 UTC
Read the original article Hit count: 448

Q1:I am using wxWidgets (C++) and have come accost a problem that i can not locate any help. I have created several wxTextCtrl boxes and would like the program to update the simple calculations in them when the user 'kills the focus.' I could not find any documentation on this subject on the wxWidgets webpage and Googling it only brought up wxPython. The two events i have found are: EVT_COMMAND_KILL_FOCUS - EVT_KILL_FOCUS for neither of which I could find any snippet for. Could anyone give me a short example or lead me to a page that would be helpful?

Q2:Would i have to create an event to handle the focus being killed for each of my 8 wxTextCtrl boxes? In the case that i have to create a different event: How would i get each event to differentiate from each other? Will i have to create new wxID's for each of the wxTextCtrl boxes?

class BasicPanel : public wxPanel { ...     
    wxTextCtrl* one;
    wxTextCtrl* two;
    wxTextCtrl* three;
    wxTextCtrl* four; ... }

© Stack Overflow or respective owner

Related posts about c++

Related posts about wxwidgets