]> Creatis software - creaImageIO.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Mon, 23 Feb 2009 13:24:36 +0000 (13:24 +0000)
committerguigues <guigues>
Mon, 23 Feb 2009 13:24:36 +0000 (13:24 +0000)
src2/creaImageIOWxTreeView.cpp

index 0b223f0e0f9ff858ff9182dfb1aa18d8ed55262c..2a58cd393a9598dfb4af7b88fd5112efe2dd4e79 100644 (file)
@@ -64,11 +64,16 @@ namespace creaImageIO
          {
                  if(col==0)
                  {
-                       ctrl->InsertColumn(col, _("Children"), col_style);
-                       //ctrl->InsertItem(0, "1");
-                       //level.key.push_back(_("Children"));
-                       //level.key.push_back(handler->GetTree().GetChildrenList().size());
-                       col++;
+                   wxListItem it;
+                   it.SetTextColour(*wxRED);
+                   it.SetText(_T("#C"));
+                   it.SetColumn(col);
+                   //              ctrl->InsertColumn(col, _("Children"), col_style);
+                   ctrl->InsertColumn(col,it);
+                   //ctrl->InsertItem(0, "1");
+                   //level.key.push_back(_("Children"));
+                   //level.key.push_back(handler->GetTree().GetChildrenList().size());
+                   col++;
                  }
                  
                GimmickDebugMessage(5,"Creating column "<<col<<" : "
@@ -252,22 +257,33 @@ namespace creaImageIO
          
            long id = GetCtrl(l)->InsertItem(item);
 
-               std::ostringstream oss;
-               
-               int     n= GetTreeHandler()->GetNumberOfChildren(*j);
-               
-               oss << n;
-               std::string s(oss.str());
-               
-               GetCtrl(l)->SetItem(id,0, crea::std2wx(s));
-               GetCtrl(l)->SetColumnWidth(0, wxLIST_AUTOSIZE );
+           std::ostringstream oss;
+           int n= GetTreeHandler()->GetNumberOfChildren(*j);
+           
+           oss << n;
+           std::string s(oss.str());
+           
+           item.SetText( crea::std2wx(s));
+           //      item.SetTextColour(*wxRED);
+           //      item.SetBackgroundColour(*wxBLACK); 
+           item.SetColumn(0);
+           GetCtrl(l)->SetItem(item);
+           //      GetCtrl(l)->SetItem(id,0, crea::std2wx(s));
+           //      GetCtrl(l)->SetColumnWidth(0, wxLIST_AUTOSIZE );
 
          for (int k=1; k<GetCtrl(l)->GetColumnCount(); k++)
              {
+
                std::string val = (*j)->GetAttribute(mLevelList[l].key[k-1]);
                if (val.size()==0) val = "?";
-               GetCtrl(l)->SetItem(id,k, crea::std2wx(val));
-               GetCtrl(l)->SetColumnWidth(k, wxLIST_AUTOSIZE );
+               item.SetText( crea::std2wx(val));
+               //              item.SetTextColour(*wxBLACK);
+               //              item.SetBackgroundColour(*wxWHITE); 
+               item.SetColumn(k);
+               GetCtrl(l)->SetItem(item);
+
+               //              GetCtrl(l)->SetItem(id,k, crea::std2wx(val));
+               // GetCtrl(l)->SetColumnWidth(k, wxLIST_AUTOSIZE );
                
              }