]> Creatis software - creaWT.git/blobdiff - wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx
2498 BBTK FeatureNewNormal wt-version PackageWt
[creaWT.git] / wt / bbtk_wt_PKG / src / bbwtLayoutSplit.cxx
index 5c304e65cf7c16baca45bd86d719daea0da7aec9..c6c8f9febdfbf56cb5affcda6710f449c117b549 100644 (file)
@@ -25,9 +25,10 @@ void LayoutSplit::Process()
 //===== 
 void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
 {
-       
-       Wt::Ext::Splitter *w = new Wt::Ext::Splitter(parent);
+       Wt::WContainerWidget* w = new Wt::WContainerWidget(parent);
+       Wt::WBoxLayout *l;
+       if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { l = new Wt::WHBoxLayout(); }
+       if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)    { l = new Wt::WVBoxLayout(); }
 
        Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w);
        Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w);
@@ -35,18 +36,11 @@ void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
        if (w1==NULL) { w1=new Wt::WContainerWidget(); }
        if (w2==NULL) { w2=new Wt::WContainerWidget(); }
 
-       int orientation=0;
-  if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { orientation=0; }
-  if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)    { orientation=1; }
-
-       w->addWidget(w1);
-       w->addWidget(w2);
-
-       if(orientation == 0){   w->setOrientation(Wt::Horizontal);}
-       else{   w->setOrientation(Wt::Vertical);}
-    
 
+       l->addWidget(w1);
+       l->addWidget(w2);
 
+       w->setLayout(l);
        
        bbSetOutputWidget( w );