Open GrimStride opened 3 years ago
Indeed, can confirm this issue. Same here.
Just found the root of the problem. This procedure in /private/windows/platform_impl.nim
:
proc init(textArea: NativeTextArea) =
var dwStyle: int32 = WS_CHILD or ES_MULTILINE or WS_VSCROLL # with wrap
# var dwStyle: int32 = WS_CHILD or ES_MULTILINE or WS_VSCROLL or WS_HSCROLL # no wrap
var dwExStyle: int32 = WS_EX_CLIENTEDGE
textArea.fHandle = pCreateWindowExWithUserdata("EDIT", dwStyle, dwExStyle, pDefaultParentWindow, cast[pointer](textArea))
pTextAreaOrigWndProc = pSetWindowLongPtr(textArea.fHandle, GWLP_WNDPROC, pTextAreaWndProc)
textArea.TextArea.init()
if you swap the commented line with the un-commented line, it works. i guess this wrap feature is just not fully implemented yet.
You are right, it's not implemented yet. I found this comment:
method `wrap=`(textArea: NativeTextArea, wrap: bool) =
procCall textArea.TextArea.`wrap=`(wrap)
# TODO: allow to enable/disable word draw at runtime
# It seems that this is not possible.
# Word wrap depends on whether dwStyle contains WS_HSCROLL at window creation.
# Changing the style later has not the wanted effect.
Just what the title says. I have this simple code based on the example:
But text is still wrapped. Here's the output from nimble so you can verify i have the latest version: