diff --git a/src/gui/control/text_ctrl.cpp b/src/gui/control/text_ctrl.cpp index 64d8eeae..a0eb0e90 100644 --- a/src/gui/control/text_ctrl.cpp +++ b/src/gui/control/text_ctrl.cpp @@ -55,7 +55,8 @@ void TextCtrl::setValue(String* value) { style->width = cs.GetWidth() - 2; style->height = cs.GetHeight() - 2; viewers.front()->getEditor()->determineSize(true); - SetMinSize(RealSize(style->width + 6, style->height + 6)); + // We don't wan to change the window size + //SetMinSize(RealSize(style->width + 6, style->height + 6)); } valueChanged(); } @@ -99,6 +100,9 @@ void TextCtrl::onSize(wxSizeEvent&) { } onChange(); } +wxSize TextCtrl::DoGetBestSize() const { + return wxSize(1,1); +} BEGIN_EVENT_TABLE(TextCtrl, DataEditor) EVT_SIZE (TextCtrl::onSize) diff --git a/src/gui/control/text_ctrl.hpp b/src/gui/control/text_ctrl.hpp index 64462301..86102bb8 100644 --- a/src/gui/control/text_ctrl.hpp +++ b/src/gui/control/text_ctrl.hpp @@ -45,6 +45,7 @@ class TextCtrl : public DataEditor { protected: virtual void onInit(); + virtual wxSize DoGetBestSize() const; private: String* value; ///< Value to edit