How can I set wordwrap mode in an EditorGadget
(instead of horizontal scrolling)?
EditorGadget, Wordwrap
EditorGadget, Wordwrap
Horst.
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
Last edited by El_Choni on Sun Jun 08, 2003 7:04 pm, edited 1 time in total.
El_Choni
Re: EditorGadget, Wordwrap
(Just adding the phrase "word wrap" here so it comes up in searches).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.