There are a few things I figured out how to do, and I seem to use them on a
regular basis. For these snippets I have to search through my projects every
now and then, to find them, and it would be a lot easier if I kept them
somewhere listed. Hopefully you will find something useful as well.

Clearing a sizer

I usually make master/detail screens where the detail list is a vertical sizer with stuff on it.
Usually a panel with more stuff on it. Every now and then you may want to clear it. I use:

Then usually I have an event that triggers on the selection of an item in the
choicebox. In the event I first get the wxChoice, then cast the client data
for the selected item to the object pointed to:

Write to file function

wxFile article(markdownfilename, wxFile::write);
if (!article.IsOpened()) {
throw std::runtime_error("main.md could not be opened for writing");
}
article.Write(textctrlArticleBody->GetValue());
article.Close();