X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e3eeddebdd4897428c0de576def883ac54f357c..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/textentry.cpp?ds=sidebyside diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index 67e03be153..a91e8f33ca 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -956,9 +956,12 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins) if ( margins.x != -1 ) { - // left margin + // Set both horizontal margins to the given value, we don't distinguish + // between left and right margin at wx API level and it seems to be + // better to change both of them than only left one. ::SendMessage(GetEditHwnd(), EM_SETMARGINS, - EC_LEFTMARGIN, MAKELONG(margins.x, 0)); + EC_LEFTMARGIN | EC_RIGHTMARGIN, + MAKELONG(margins.x, margins.x)); } if ( margins.y != -1 )