Using Events

Purpose

To explain how to use the Events tab in wxFormBuilder. This is available in wxFormBuiler v3.0.08 and beyond.

Steps

  1. Create different ID's for each control. (ex. ID_BUTTON_SEND)
  2. Click the Events tab.
  3. Type the name of the function you want to impliment. (ex. OnButtonSendClick)
  4. Click the Generate toolbar button. (Press F8)
  5. In your inherited class create the function just as you specified in the 'Events' tab.
    Example:
    void MyPanel::OnButtonSendClick( wxCommandEvent& event )
    {
        ::wxMessageBox( wxT("OnButtonSendClick() event fired.") );
    }

Notice there is no mention about the event table. Leave it alone. All you write is the implementation code.