void wxBlackBoxEditionDialog::constructBlackBoxEditionDialog()
{
- wxBoxSizer *sizerDialog = new wxBoxSizer(wxVERTICAL);
-
- wxScrolledWindow *scrollWin = new wxScrolledWindow( this, -1, wxDefaultPosition, wxSize(200,200), wxVSCROLL);
+ wxBoxSizer *sizerDialog = new wxBoxSizer(wxVERTICAL);
+ wxScrolledWindow *scrollWin = new wxScrolledWindow( this, -1, wxDefaultPosition, wxSize(200,200), wxVSCROLL);
wxString boxtype( crea::std2wx( _model->getBBTKType() ) );
text->SetFont(font);
textBoxName->SetFont(font);
-
- std::vector<GPortModel*> lstInputs = _model->getInputPorts();
- wxFlexGridSizer *sizer = new wxFlexGridSizer(lstInputs.size(),3,5,5);
+ std::vector<GPortModel*> lstInputs = _model->getInputPorts();
+ wxFlexGridSizer *sizer = new wxFlexGridSizer(lstInputs.size(),3,5,5);
sizer->AddGrowableCol(0);
sizer->AddGrowableCol(1);
sizer->AddGrowableCol(2);
wxStaticText *lblType = new wxStaticText(scrollWin, -1, std2wx(type),wxDefaultPosition,wxSize(250,25));
wxTextCtrl *txtValue = new wxTextCtrl(scrollWin, -1, _T(""),wxDefaultPosition,wxDefaultSize);
-
-
lblName->SetToolTip( std2wx(port->getBBTKDescription()) );
txtValue->SetToolTip( std2wx(port->getBBTKDescription()) );
-
-
+
if(port->getValue()!="")
{
std::string text = port->getValue();
_lstValues.push_back(txtValue);
_lstTypes.push_back(lblType);
- sizer->Add(lblName,1,wxEXPAND,5);
+ sizer->Add(lblName,1,wxALIGN_RIGHT|wxEXPAND,5);
sizer->Add(txtValue,1,wxEXPAND,5);
- sizer->Add(lblType,1,wxCENTRE|wxEXPAND,5);
+ sizer->Add(lblType,1,wxEXPAND,5);
}
-
wxBoxSizer *buts = new wxBoxSizer(wxHORIZONTAL);
wxButton *okButton = new wxButton(scrollWin, -1, _T("Ok"),wxDefaultPosition, wxSize(70, 30));
wxButton *closeButton = new wxButton(scrollWin, -1, _T("Close"), wxDefaultPosition, wxSize(70, 30));
buts->Add(okButton,0,wxCENTRE|wxEXPAND,5);
buts->Add(closeButton,0,wxCENTRE|wxEXPAND,5);
-
sizerDialog->AddSpacer(10);
- sizerDialog->Add(textBoxName,0,wxALIGN_TOP|wxALIGN_CENTER);
+
+// sizerDialog->Add(textBoxName,0,wxALIGN_TOP|wxALIGN_CENTER);
+ sizerDialog->Add(textBoxName,0,wxALIGN_CENTER);
+
sizerDialog->AddSpacer(10);
sizerDialog->Add(boxnameSizer, wxSizerFlags(0).Align(0).Border(wxLEFT, 100));
sizerDialog->AddSpacer(10);
- sizerDialog->Add(text,0,wxALIGN_TOP|wxALIGN_CENTER);
- sizerDialog->AddSpacer(15);
- sizerDialog->Add(sizer,0,wxALIGN_CENTER| wxEXPAND);
+
+// sizerDialog->Add(text,0,wxALIGN_TOP|wxALIGN_CENTER);
+ sizerDialog->Add(text,0,wxALIGN_CENTER);
+
+ sizerDialog->AddSpacer(15);
+
+// sizerDialog->Add(sizer,0,wxALIGN_CENTER| wxEXPAND);
+ sizerDialog->Add(sizer,0, wxEXPAND);
+
sizerDialog->AddSpacer(15);
- sizerDialog->Add(buts,0,wxALIGN_CENTER | wxTOP | wxBOTTOM);
+ sizerDialog->Add(buts,0,wxALIGN_CENTER | wxTOP );
scrollWin->SetSizer(sizerDialog);
scrollWin->Centre();
-
scrollWin->SetVirtualSize(400,400);
scrollWin->SetSize(300,300);
scrollWin->SetScrollbars(10, 10, 50, 50);
// scrollWin->SetSizer(sizer);
-
ShowModal();
Destroy();
}