I need vertical scrollbar on Editor to be fixed (instead of automatically appear/disappear depend on text size).
For that ES_DISABLENOSCROLL style can be applied, but looks like that doesn't work for existing control (need to set it when creating).
To be exact I'm just trying to make text with WordWrap flag look fine, and that "dynamical" scrollbar turns it bad.
Any ideas how that can be done (except creating control directly through WinAPI or using external scrollbar)^^?
Code: Select all
EnableExplicit
Global dlg_window1 = CreateDialog(#PB_Any)
Global DialogsXML$ = #Empty$
DialogsXML$ +
"<dialogs>" +
" <window name='window1' flags='#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_ScreenCentered'>" +
" <editor name='editor1' flags='#PB_Editor_WordWrap' width='200' height='100'/>" +
" </window>" +
"</dialogs>"
Define DialogsXML = ParseXML(#PB_Any, DialogsXML$)
If OpenXMLDialog(dlg_window1, DialogsXML, "window1")
Define editor = DialogGadget(dlg_window1, "editor1")
; Damn, that doesn't work
Define Style = GetWindowLong_(GadgetID(editor), #GWL_STYLE)
Style | #ES_DISABLENOSCROLL
SetWindowLong_(GadgetID(editor), #GWL_STYLE, Style)
SetGadgetText(editor, ~"11111111111111111111111111111111\n22222222222222222222222222222222\n\n\n\n\n\n\n")
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow