wxPanel::Create(parent, id, pos, size, style);
this->cMakeLists = makefile;
CreateControls();
+ // this part makes the scrollbars show up
+ this->FitInside(); // ask the sizer about the needed size
+ this->SetScrollRate(5, 5);
return TRUE;
}
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->cMakeLists->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
- wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+ wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+ returnLnk->SetWindowStyle(wxNO_BORDER);
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
- {
- linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
- }
+ linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
+
+ linksSizer->Add(new wxStaticText(this, wxID_ANY, crea::std2wx(this->cMakeLists->GetName())), 0, wxALIGN_CENTER, 0);
+
sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5);
//Header
std::vector<modelCDMIProjectTreeNode*> parents = this->cMakeLists->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{