]> Creatis software - creaWT.git/blobdiff - wt/bbtk_wt_PKG/src/bbwtSlider.cxx
#2498 creaWt Feature New Normal wt-version kernel
[creaWT.git] / wt / bbtk_wt_PKG / src / bbwtSlider.cxx
index dfc7747d5a820fbe0153eab131f35ace4352ada9..875d5b833dc7426314a77136be5b693958804851 100644 (file)
@@ -42,6 +42,8 @@ namespace bbwt
        Slider*      mBox;
                  Wt::WSlider     *mwtSlider;
                  Wt::WSlider     *mResolutionOfSlider;
+                 Wt::WText    *textTitle;
+                 Wt::WString  tTitle;
                  int          min;
                  int          max;
                        bool         reactiveOnTrack;
@@ -67,6 +69,7 @@ namespace bbwt
     : 
        Wt::WContainerWidget(parent),
        mBox(box),
+       tTitle(title),
                  min(vmin),
                  max(vmax),
                        reactiveOnTrack(reactiveontrack)
@@ -112,6 +115,7 @@ namespace bbwt
                //mwtSlider->setValueText(title);
                mwtSlider->valueChanged().connect(this,&SliderWidget::OnSliderTrack);
                mwtSlider->sliderMoved().connect(this,&SliderWidget::OnSliderMove);
+   // mwtSlider->resize(Wt::WLength::Auto, 50);
 
               
     // If asked : creation of the other little slider which allows to change 
@@ -146,7 +150,8 @@ namespace bbwt
     //---------------------------------------------------------------------
     // 2) Insertion of the components in the window
                std::cout<<"Creando SLIDER  --  4  "<<std::endl;
-               layout->addWidget(new Wt::WText(title),Wt::WBorderLayout::North);
+               textTitle = new Wt::WText(tTitle + bbtk::std2wt(" : ")+ mwtSlider->valueText());
+               layout->addWidget(textTitle,Wt::WBorderLayout::North);
                layout->addWidget(mwtSlider,Wt::WBorderLayout::Center);
                                std::cout<<"Creando SLIDER  --  5  "<<std::endl;
     // Insert the sizer in the main panel and refresh the layout
@@ -201,7 +206,7 @@ namespace bbwt
                }
     // and signal that the output has changed
     mBox->bbSignalOutputModification(std::string("Out"));    
-
+    textTitle->setText(tTitle + bbtk::std2wt(" : ") + mwtSlider->valueText());
   }
   
   
@@ -218,6 +223,7 @@ namespace bbwt
        }
     // and signal that the output has changed
     mBox->bbSignalOutputModification(std::string("Out"));    
+        textTitle->setText(tTitle + bbtk::std2wt(" : ") + mwtSlider->valueText());
 
   }
 
@@ -294,7 +300,8 @@ namespace bbwt
                                        ); 
     //    std::cout << "w = "<<w<<std::endl;
     // w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
-         
+    w->setMinimumSize(Wt::WLength::Auto, 120);
+         w->setMaximumSize(Wt::WLength::Auto, 180);
     bbSetOutputWidget( w );
   }