Can't set wxChoice background color
Posted: Fri Jun 05, 2020 3:14 pm
Hi all,
I'm currently changing around background and font colors in my program to be easier on the eyes, but wxChoice is fighting me.
The code to generate a wxChoice is as follows:
Then the control is given colors to change background and font, like so:
However, the Choice box and its dropdown arrow do not change color. When you click the dropdown, the options come up with the correct colors.
What do I have to change to change the color of the dropdown arrow/box as well?
Edit: This is 3.1.3 on MSW.
I'm currently changing around background and font colors in my program to be easier on the eyes, but wxChoice is fighting me.
The code to generate a wxChoice is as follows:
Code: Select all
wxString m_choiceBoxChoices[] = { wxT("default"), wxT("default") };
int m_choiceBoxNChoices = sizeof( m_choiceBoxChoices ) / sizeof( wxString );
m_choiceBox = new wxChoice( this, wxID_CHOICEDIALOGCHOICEBOX, wxDefaultPosition, wxSize( 300, -1 ), m_choiceBoxNChoices, m_choiceBoxChoices, 0 );
m_choiceBox->SetSelection( 0 );
m_choiceBox->SetFont(wxFont(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
choiceDialogSizer->Add( m_choiceBox, 0, wxALL, 5 );
Code: Select all
m_choiceBox->SetBackgroundColour(wxColour(0, 0, 204, 255));
m_choiceBox->SetForegroundColour(wxColour(255, 255, 255, 255));
What do I have to change to change the color of the dropdown arrow/box as well?
Edit: This is 3.1.3 on MSW.