21ConstantForm::ConstantForm(wxWindow* parent,
Constant* constant) : ConstantFormBase(parent)
23 SetSize(GetBestSize());
26 m_constant = constant;
28 m_textCtrlValue->SetValue(m_constant->StringFromDouble(m_constant->GetValue()));
31ConstantForm::~ConstantForm() {}
32void ConstantForm::OnOKButtonClick(wxCommandEvent& event)
34 if(ValidateData()) EndModal(wxID_OK);
37bool ConstantForm::ValidateData()
40 if(!m_constant->DoubleFromString(
this, m_textCtrlValue->GetValue(), value,
41 _(
"Value entered incorrectly in the field \"Constant value\".")))
44 m_constant->SetValue(value);
A control element that provides a constant value.