diff --git a/source/gui/widgets/spinbox.cpp b/source/gui/widgets/spinbox.cpp index 87cec724..2cb89870 100644 --- a/source/gui/widgets/spinbox.cpp +++ b/source/gui/widgets/spinbox.cpp @@ -441,7 +441,10 @@ namespace nana text = to_wstring(modifier_.prefix + range_->value() + modifier_.suffix); if (editor_->text() != text) + { editor_->text(text, false); + editor_->try_refresh(); + } _m_draw_spins(spin_stated_); } @@ -736,7 +739,8 @@ namespace nana if (editor) { editor->text(to_wstring(text), false); - API::refresh_window(*this); + if (editor->try_refresh()) + API::update_window(*this); } } }//end namespace nana diff --git a/source/gui/widgets/textbox.cpp b/source/gui/widgets/textbox.cpp index 909cde92..5ae9454b 100644 --- a/source/gui/widgets/textbox.cpp +++ b/source/gui/widgets/textbox.cpp @@ -738,7 +738,9 @@ namespace drawerbase { if (editor) { editor->text(to_wstring(str), false); - API::update_window(this->handle()); + + if (editor->try_refresh()) + API::update_window(this->handle()); } }