1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
UIAnswerPanel::UIAnswerPanel(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
{
//(*Initialize(UIAnswerPanel)
Create(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("id"));
mainSizer = new wxBoxSizer(wxHORIZONTAL);
mCheckBox = new wxCheckBox(this, ID_CHECKBOX1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
mCheckBox->SetValue(false);
mainSizer->Add(mCheckBox, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
mTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL1, _("AnswerTextCtrl"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxVSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL1"));
mTextCtrl->SetMaxLength(200);
mainSizer->Add(mTextCtrl, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
SetSizer(mainSizer);
mainSizer->Fit(this);
mainSizer->SetSizeHints(this);
//*)
mTextCtrl->Connect(wxEVT_SET_FOCUS,(wxObjectEventFunction)&UIAnswerPanel::OnSetFocus, NULL, this);
this-> SetName (_("answerPanel"));
}
UIAnswerPanel::UIAnswerPanel(wxWindow* parent, Answer answerArg, wxWindowID id,const wxPoint& pos,const wxSize& size)
{//
//
// Can't use wxSmith to edit the constructor's arguments, just copy paste the constructor after any modifications.
// ........
//
Create(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("id"));
mainSizer = new wxBoxSizer(wxHORIZONTAL);
mCheckBox = new wxCheckBox(this, ID_CHECKBOX1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
mCheckBox->SetValue(false);
mainSizer->Add(mCheckBox, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
mTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL1, _("AnswerTextCtrl"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxVSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL1"));
mTextCtrl->SetMaxLength(200);
mainSizer->Add(mTextCtrl, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
SetSizer(mainSizer);
mainSizer->Fit(this);
mainSizer->SetSizeHints(this);
//*)
mTextCtrl->Connect(wxEVT_SET_FOCUS,(wxObjectEventFunction)&UIAnswerPanel::OnSetFocus, NULL, this);
this-> SetName (_("answerPanel"));
///////////// .....
mTextCtrl -> SetValue (answerArg . GetText() );
mCheckBox -> SetValue (answerArg . GetRight());
}
| |