Beispiel #1
0
//------------------------------------------------------------------------------
void MainPanel::OnListOrFileModified(wxCommandEvent& event)
{
    if(event.GetEventType() == wxEVT_COMMAND_LISTBOX_SELECTED && !event.IsSelection()) // Prevent segmentation fault : list box deselection send event when the frame is destroying an half the objects are deleted
    {
        return;
    }

    m_btInstall->Enable(IsInstallOk());
}
    void onListBoxItemSelected( wxCommandEvent& event ) override
    {
        // change the help text based on the m_listbox selection:
        if( event.IsSelection() )
        {
            string  option = TO_UTF8( event.GetString() );
            UTF8    help_text;

            if( m_choices.Value( option.c_str(), &help_text ) )
            {
                wxString page = help_text;

                m_html->SetPage( page );
            }
            else
            {
                m_html->SetPage( m_initial_help );
            }
        }
    }
Beispiel #3
0
/*----------------------------------------------------------------------
  ----------------------------------------------------------------------*/
void ListNSDlgWX::OnNSSelected(wxCommandEvent& event)
{
    if (event.IsSelection())
        XRCCTRL(*this, "wxID_COMBOBOX_NEW_ELEM_NS", wxComboBox)->SetValue(event.GetString());
}