EditorGadget(#PB_Any, 10, 80, 330, 90,#PB_Editor_WordWrap),
Hello, I have a EditorGadget and I want prevent the use of Enter key to get in new line, is possible ?
EditorGadget, prevent use of Enter / CR LF
Re: EditorGadget, prevent use of Enter / CR LF
I went through this same challenge. I solved it by binding the Change event (#PB_EventType_Change) to the control, and on every change to the data, I just looked for #LF$ and if exists in the data, just remove it, something like:
...within the procedure that you bind to the event. Hopefully this points you in the right direction!
Code: Select all
If CountString(GetGadgetText(#UserInputEditor), #LF$)
SetGadgetText(#UserInputEditor, RemoveString(GetGadgetText(#UserInputEditor), #LF$))
EndIf
Efo74 wrote:EditorGadget(#PB_Any, 10, 80, 330, 90,#PB_Editor_WordWrap),
Hello, I have a EditorGadget and I want prevent the use of Enter key to get in new line, is possible ?
-Dan L.
:: falling on my face a lot lately; learning even more because of it! ::
:: falling on my face a lot lately; learning even more because of it! ::
Re: EditorGadget, prevent use of Enter / CR LF
Thank you, nice solution