As mentioned in my previous post, I'm in the process of porting my wxWidgets application from Windows 10 to Linux Mint. I have the latest version of Linux and wxWidgets (installed from source), and I'm using the Code::Blocks IDE with all wxWidgets plugins installed. I setup a wxWidgets 3.0.x project when creating my application. Now i'm running into some problems with certain methods (which worked fine in Windows). For example:
- The SetBackgroundColour() method doesn't seem to work at all, when used with buttons and static texts.
- The wxALIGN_CENTRE_HORIZONTAL static text style option doesn't always work - the text remains left indented. Neither does wxALIGN_RIGHT.
- The position of some static texts doesn't change despite changing the wxPoint() parameter.
Here is an example of the static texts:
Code: Select all
m_static_txt_reference = new wxStaticText(this, wxID_ANY, _T("Pomiar Referencyjny"), wxPoint(580, 240), wxSize(120, 20), wxALIGN_CENTRE_HORIZONTAL);
m_static_txt_adc1 = new wxStaticText(this, wxID_ANY, "N/A", wxPoint(610, 270), wxSize(110, 20), wxALIGN_CENTRE_HORIZONTAL);
m_static_txt_adc2 = new wxStaticText(this, wxID_ANY, "N/A", wxPoint(270, 70), wxSize(110, 30), wxALIGN_CENTRE_HORIZONTAL);
m_static_txt_adc3 = new wxStaticText(this, wxID_ANY, "N/A", wxPoint(270, 155), wxSize(110, 30), wxALIGN_CENTRE_HORIZONTAL);
m_static_txt_adc4 = new wxStaticText(this, wxID_ANY, "N/A", wxPoint(270, 270), wxSize(110, 30), wxALIGN_CENTRE_HORIZONTAL);
Code: Select all
if (mbConfigurationCoil == 1)
{
if ((m_btn_wsun->GetBackgroundColour()) != wxColour(0, 210, 0)) m_btn_wsun->SetBackgroundColour(wxColour(0, 210, 0));
if ((m_btn_wysun->GetBackgroundColour()) != wxColour(210, 210, 210)) m_btn_wysun->SetBackgroundColour(wxColour(210, 210, 210));
}
else
{
if ((m_btn_wysun->GetBackgroundColour()) != wxColour(0, 210, 0)) m_btn_wysun->SetBackgroundColour(wxColour(0, 210, 0));
if ((m_btn_wsun->GetBackgroundColour()) != wxColour(210, 210, 210)) m_btn_wsun->SetBackgroundColour(wxColour(210, 210, 210));
}
Regards,
Ksawery