X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMBlackBoxDescriptionPanel.cpp;h=b694aee05b7c3b033917157b1424f2619e117b02;hb=0cc6a7e002ad79de9453517108d7456fd44ddfdb;hp=0d2eb5df1fc34afb4bc222db75a0248cc91ee76c;hpb=6a43a8cc1e5216f06e41799fbe154b2b1ef6d44b;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp index 0d2eb5d..b694aee 100644 --- a/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp @@ -78,9 +78,12 @@ bool wxCDMBlackBoxDescriptionPanel::Create( long style ) { - wxPanel::Create(parent, id, pos, size, style); this->blackBox = blackBox; + wxPanel::Create(parent, id, pos, size, style); CreateControls(); + // this part makes the scrollbars show up + this->FitInside(); // ask the sizer about the needed size + this->SetScrollRate(5, 5); return TRUE; } @@ -93,14 +96,15 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls() std::vector parents = this->blackBox->GetParents(); 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 < (int)(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->blackBox->GetName())), 0, wxALIGN_CENTER, 0); + sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5); //Header @@ -185,7 +189,7 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls() openCxxbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMBlackBoxDescriptionPanel::OnCxxMouseExit,NULL,this); openCxxbt->SetToolTip(wxT("Open the .cxx file in the default text editor.")); actionsGridSizer->Add(openCxxbt, 1, wxALL | wxEXPAND, 5); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Source Folder")); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Source Folder")); openFolderbt->SetToolTip(wxT("Open the source folder in the file explorer.")); actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);