I setup the accelerator entries and table as,
Code: Select all
wxAcceleratorEntry entries[4];
entries[0].Set(wxACCEL_NORMAL, WXK_SPACE, BCID_Play);
entries[1].Set(wxACCEL_NORMAL, (int) 'L', BCID_Loop);
entries[2].Set(wxACCEL_NORMAL, (int) 'S', BCID_Stop);
entries[3].Set(wxACCEL_NORMAL, (int) 'P', BCID_Settings);
wxAcceleratorTable accel(4, entries);
this->SetAcceleratorTable(accel);
Code: Select all
PlayButton = new wxButton(TopPanel, BCID_Play, "Play", wxDefaultPosition, wxDefaultSize, 0);
LoopButton = new wxToggleButton(TopPanel, BCID_Loop, "Loop", wxDefaultPosition, wxDefaultSize, 0);
StopButton = new wxButton(TopPanel, BCID_Stop, "Stop", wxDefaultPosition, wxDefaultSize, 0);
SettingsButton = new wxButton(TopPanel, BCID_Settings, "Settings", wxDefaultPosition, wxDefaultSize, 0);
The controls them selves work fine, i.e with mouse click.