for(int i = 0; i < vnom.size(); i++){
//sizex = vectbutton[i]->GetSize().GetWidth();
- std::string n = vnom[i];
- vectbutton[i]->SetToolTip(wxString(n));
+ //const std::string n = vnom[i];
+ wxString newstring1(vnom[i].c_str() , wxConvUTF8);
+ //vectbutton[i]->SetToolTip(wxString(n));
+ vectbutton[i]->SetToolTip(newstring1);
+
//wxStaticText* statictext = getText(n, sizex, 15);
//flexsizer->Add(statictext, wxEXPAND |wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTRE_HORIZONTAL|wxSHAPED);
}
virtual wxBitmapButton* getButton(std::string imgpath, int sizex, int sizey){
vectimgpath.push_back(imgpath);
+ wxString newstring1( imgpath.c_str() , wxConvUTF8);
+ //wxBitmap* bitmap = new wxBitmap(imgpath, wxBITMAP_TYPE_PNG);
+ wxBitmap* bitmap = new wxBitmap(newstring1, wxBITMAP_TYPE_PNG);
- wxBitmap* bitmap = new wxBitmap(imgpath, wxBITMAP_TYPE_PNG);
-
//wxSize(sizex,sizey)
wxBitmapButton* bitmapbutton = new wxBitmapButton(this, -1, *bitmap, wxDefaultPosition, wxDefaultSize,
- wxBU_AUTODRAW, wxDefaultValidator, wxString(""));
+ wxBU_AUTODRAW, wxDefaultValidator, _T(""));
vectbutton.push_back(bitmapbutton);
return bitmapbutton;
**/
virtual wxStaticText* getText(std::string nom, int sizex, int sizey){
vectnom.push_back(nom);
- return new wxStaticText(this, -1, wxString(nom), wxDefaultPosition,
- wxSize(sizex,sizey), wxALIGN_CENTRE, wxString(nom));
+ wxString newstring1(nom.c_str() , wxConvUTF8);
+ return new wxStaticText(this, -1, newstring1 /*wxString(nom)*/, wxDefaultPosition,
+ //wxSize(sizex,sizey), wxALIGN_CENTRE, wxString(nom));
+ wxSize(sizex,sizey), wxALIGN_CENTRE, newstring1);
}
/**
** Sets the vector funcion, this vector must contain a function for each button created