diff options
| author | trustable-code <krauter.simon@arcor.de> | 2020-01-23 19:05:27 +0100 |
|---|---|---|
| committer | trustable-code <krauter.simon@arcor.de> | 2020-01-23 19:05:27 +0100 |
| commit | 2ad274f00efe4100ac81124082ff2206cf0c661b (patch) | |
| tree | afeabc31dfb44474b2703fce669dd455ca1c386a | |
| parent | 8c92d5fc6753e4068b991fdd189202271912652d (diff) | |
| download | NiGui-2ad274f00efe4100ac81124082ff2206cf0c661b.tar.gz NiGui-2ad274f00efe4100ac81124082ff2206cf0c661b.zip | |
Windows: TextBox: allow input of text bigger than the box by adding ES_AUTOHSCROLL
Fixes #89
| -rwxr-xr-x | src/nigui/private/windows/platform_impl.nim | 2 | ||||
| -rwxr-xr-x | src/nigui/private/windows/windows.nim | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/nigui/private/windows/platform_impl.nim b/src/nigui/private/windows/platform_impl.nim index 4fd2950..a9c5677 100755 --- a/src/nigui/private/windows/platform_impl.nim +++ b/src/nigui/private/windows/platform_impl.nim @@ -1509,7 +1509,7 @@ proc pTextBoxWndProc(hWnd: pointer, uMsg: int32, wParam, lParam: pointer): point result = CallWindowProcW(pTextBoxOrigWndProc, hWnd, uMsg, wParam, lParam) proc init(textBox: NativeTextBox) = - textBox.fHandle = pCreateWindowExWithUserdata("EDIT", WS_CHILD or WS_TABSTOP, WS_EX_CLIENTEDGE, pDefaultParentWindow, cast[pointer](textBox)) + textBox.fHandle = pCreateWindowExWithUserdata("EDIT", WS_CHILD or WS_TABSTOP or ES_AUTOHSCROLL, WS_EX_CLIENTEDGE, pDefaultParentWindow, cast[pointer](textBox)) pTextBoxOrigWndProc = pSetWindowLongPtr(textBox.fHandle, GWLP_WNDPROC, pTextBoxWndProc) textBox.TextBox.init() diff --git a/src/nigui/private/windows/windows.nim b/src/nigui/private/windows/windows.nim index 349afaa..9f599d9 100755 --- a/src/nigui/private/windows/windows.nim +++ b/src/nigui/private/windows/windows.nim @@ -61,6 +61,7 @@ const EM_SETREADONLY* = 207 EN_CHANGE* = 768 ES_MULTILINE* = 4 + ES_AUTOHSCROLL* = 0x80 GCLP_HBRBACKGROUND* = -10 GWL_EXSTYLE* = -20 GWL_HINSTANCE* = -6 |
