]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp
Feature #1711 CreaDevManager application implementation
[crea.git] / lib / creaDevManagerLib / wxCDMBlackBoxDescriptionPanel.cpp
index 0d2eb5df1fc34afb4bc222db75a0248cc91ee76c..c562ef74054392b4e6c70c6b3ca60baa5057d228 100644 (file)
@@ -79,6 +79,11 @@ bool wxCDMBlackBoxDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->blackBox = blackBox;
   CreateControls();
   return TRUE;
@@ -93,14 +98,15 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> 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 +191,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);