Ignore:
Timestamp:
Mar 27, 2013, 5:14:47 PM (11 years ago)
Author:
garnier
Message:

Mise en place des comboBox et changement de l'aspect visuel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_sectionToExecute.cc

    r397 r399  
    22#include <Wt/WVBoxLayout>
    33#include <Wt/WHBoxLayout>
     4#include <Wt/WGridLayout>
    45#include <Wt/WContainerWidget>
    56#include <Wt/WImage>
     
    1516softwarePanel(sPanel)
    1617{
    17     Wt::WHBoxLayout* mainContainerLayout = new Wt::WHBoxLayout();
     18    Wt::WGridLayout* mainContainerLayout = new Wt::WGridLayout();
    1819    mainContainerLayout->setContentsMargins(0,0,0,0);
    1920
     
    2627    labelAndComboInsideContainerLayout->setContentsMargins(0,0,0,0);
    2728   
    28     labelAndComboInsideContainerLayout->addWidget(new Wt::WText(" from : "));
     29    labelAndComboInsideContainerLayout->addWidget(new Wt::WText("from&nbsp;:&nbsp;"));
    2930    labelAndComboInsideContainerLayout->addWidget(first);
    30     labelAndComboInsideContainerLayout->addWidget(new Wt::WText(" to : "));
     31    labelAndComboInsideContainerLayout->addWidget(new Wt::WText("to&nbsp;:&nbsp;"));
    3132    labelAndComboInsideContainerLayout->addWidget(last);
    3233    labelAndComboInsideContainerLayout->addWidget(soft);
     
    3940    labelAndComboContainer->setLayout(labelAndComboContainerLayout);
    4041   
    41     // add label and Combo containers
    42     mainContainerLayout->addWidget(labelAndComboContainer);
    43 
    4442           
    4543    // add errors and warning layout
     
    4846
    4947    Wt::WContainerWidget* warningsAndErrorsContainer = new Wt::WContainerWidget();
    50     Wt::WVBoxLayout* vLayoutContainer = new Wt::WVBoxLayout();
    51 
    52     vLayoutContainer->addWidget(warningsContainer_);
    53     vLayoutContainer->addWidget(errorsContainer_);
    54     vLayoutContainer->addStretch (100);
     48    Wt::WVBoxLayout* vWarningsAndErrorsLayoutContainer = new Wt::WVBoxLayout();
    5549   
    5650    Wt::WHBoxLayout* hLayoutContainerWarnings = new Wt::WHBoxLayout();
     
    5852
    5953   
    60     // fill containers
    61     Wt::WImage* imgWarning = new WImage ("/htdocs/warning.png");
    62     Wt::WImage* imgError = new WImage ("/htdocs/error.png");
    63 
    64     // resize images
    65     imgWarning->resize(20,20);
    66     imgError->resize(20,20);
    67    
    68     warningsLabel_ = new Wt::WLabel("");
    69     errorsLabel_ = new Wt::WLabel("");
    70 
    71     hLayoutContainerWarnings->addWidget(imgWarning);
     54    warningsLabel_ = new Wt::WText("",XHTMLText);
     55    errorsLabel_ = new Wt::WText("",XHTMLText);
    7256    hLayoutContainerWarnings->addWidget(warningsLabel_);
    73     hLayoutContainerErrors->addWidget(imgError);
    7457    hLayoutContainerErrors->addWidget(errorsLabel_);
    7558
     
    8265    errorsContainer_->setLayout(hLayoutContainerErrors);
    8366   
    84     warningsAndErrorsContainer->setLayout(vLayoutContainer);
     67    vWarningsAndErrorsLayoutContainer->addWidget(errorsContainer_);
     68    vWarningsAndErrorsLayoutContainer->addWidget(warningsContainer_);
     69    vWarningsAndErrorsLayoutContainer->addStretch (100);
    8570
     71    warningsAndErrorsContainer->setLayout(vWarningsAndErrorsLayoutContainer);
     72
     73    // add label and Combo containers
     74    mainContainerLayout->addWidget(labelAndComboContainer,0,0);
    8675    // add warnings and errors containers
    87 //    mainContainerLayout->addWidget(warningsAndErrorsContainer);
     76    mainContainerLayout->addWidget(warningsAndErrorsContainer,1,0);
    8877
    89     this->setLayout(mainContainerLayout);
    90    
     78    // manage margins
     79    vWarningsAndErrorsLayoutContainer->setContentsMargins(20,0,0,0);
     80    hLayoutContainerWarnings->setContentsMargins(0,0,0,0);
     81    hLayoutContainerErrors->setContentsMargins(0,0,0,0);
     82
     83    setLayout(mainContainerLayout);
     84    warningsContainer_->setStyleClass("warningsContainer");
     85    errorsContainer_->setStyleClass("errorsContainer");
     86
    9187   
    9288    firstElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
Note: See TracChangeset for help on using the changeset viewer.