EditorGadget, Wordwrap
Posted: Sun Jun 08, 2003 3:15 pm
How can I set wordwrap mode in an EditorGadget
(instead of horizontal scrolling)?
(instead of horizontal scrolling)?
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
If OpenWindow(0, 100, 200, 195, 260, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget, "PureBasic Window")=0:End:EndIf
If CreateGadgetList(WindowID())=0:End:EndIf
EditorGadget(0, 0, 0, WindowWidth(), WindowHeight())
SendMessage_(GadgetID(0), #EM_SETTARGETDEVICE, #NULL, 0)
;SendMessage_(GadgetID(0), #EM_SETTARGETDEVICE, #NULL, $FFFFFF) ; to turn word-wrap off again (use just a huge value, stands for line width)
SetGadgetText(0, "This text gets wrapped, but I think line numbers won't be properly handled now, so be careful.")
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
End