diff --git a/src/gui/value/text.cpp b/src/gui/value/text.cpp index 21fb6610..816b26f3 100644 --- a/src/gui/value/text.cpp +++ b/src/gui/value/text.cpp @@ -559,6 +559,10 @@ wxMenu* TextValueEditor::getMenu(int type) const { // ----------------------------------------------------------------------------- : Drawing void TextValueEditor::draw(RotatedDC& dc) { + if (nativeLook()) { + // clip the dc to the region of this control + dc.SetClippingRegion(style().getInternalRect()); + } // update scrollbar prepareDrawScrollbar(dc); // draw text @@ -574,6 +578,9 @@ void TextValueEditor::draw(RotatedDC& dc) { fixSelection(); showCaret(); } + if (nativeLook()) { + dc.DestroyClippingRegion(); + } } void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_selection_end_i, bool old_drop_down_shown) {