Skip to content

Commit

Permalink
Stop using Fn keys as accelerators in the widgets sample
Browse files Browse the repository at this point in the history
This prevented them from being used for their usual purposes, e.g. F4
didn't open the combobox dropdown under MSW, which was annoying as it
made testing more difficult.

Just stop using the accelerators, especially as they could be only used
for less than half of pages anyhow.
  • Loading branch information
vadz committed Feb 17, 2018
1 parent 4179375 commit 1dc1d66
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions samples/widgets/widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ void WidgetsFrame::InitBook()
wxArrayString labels[MAX_PAGES];

wxMenu *menuPages = new wxMenu;
unsigned int nPage = 0, nFKey = 0;
unsigned int nPage = 0;
int cat, imageId = 1;

// we need to first create all pages and only then add them to the book
Expand Down Expand Up @@ -579,16 +579,9 @@ void WidgetsFrame::InitBook()
labels[cat].Add(info->GetLabel());
if ( cat == ALL_PAGE )
{
wxString radioLabel(info->GetLabel());
nFKey++;
if ( nFKey <= 12 )
{
radioLabel << wxT("\tF" ) << nFKey;
}

menuPages->AppendRadioItem(
Widgets_GoToPage + nPage,
radioLabel
info->GetLabel()
);
#if !USE_TREEBOOK
// consider only for book in book architecture
Expand Down

0 comments on commit 1dc1d66

Please sign in to comment.