Page 1 of 1

wordwrap

Posted: Sat Sep 18, 2004 12:04 pm
by thefool
Code updated For 5.20+ (same As #PB_Editor_WordWrap in EditorGadget)

Hi. I think someone always looks for wordwrap for the editor gadgets and string gadgets.

So i made this little thing and called the topic "Wordwrap", so people would find it. Here is a simple procedure just to have as include etc.

Code: Select all

Procedure WordWrap(gadget,state)
If state=1
SendMessage_(GadgetID(gadget), #EM_SETTARGETDEVICE, #NULL, 0)
Else
SendMessage_(GadgetID(0), #EM_SETTARGETDEVICE, #NULL, $FFFFFF)
endif
EndProcedure
So you just call WordWrap(gadget,state)
if state is 1, wordwrap is on, if not 1, its off again.