Need some help with editor gadget.
Need some help with editor gadget.
The problem is, I have editor gadget and "return" as a keyboard shortcut so when I press enter while cursor is in editor gadget it does not move the cursor to the next line.
im using purebasic 4.1 by the way I dont know of this happens with later versions?
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Need some help with editor gadget.
Hi
If your app is for Windows:
.... = no need to enter <Enter>, if not critical for the purposes of your app.
If your app is for Windows:
Code: Select all
SendMessage_(GadgetID(#Editor001), #EM_SETTARGETDEVICE, #Null, 0) ;=WordWrap on
Last edited by IdeasVacuum on Thu Mar 08, 2012 10:56 pm, edited 1 time in total.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Need some help with editor gadget.
I really needed that code as well I really wanted to turn wordwrap on so thank you so much.
is there any way to send the next line command through a similar method so i can attach it to the keyboard shortcut action of its the active gadget and enter is pushed?
is there any way to send the next line command through a similar method so i can attach it to the keyboard shortcut action of its the active gadget and enter is pushed?
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Need some help with editor gadget.
Not sure, but having word-wrap on might allow <Enter> to work anyway.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Need some help with editor gadget.
Another possibility. If the Editor Gadget is the Active Gadget, Then use RemoveKeyboardShortcut() to stop the Window Event picking-up on the <Enter> key. When the Editor Gadget loses focus, re-create the Shortcut.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Need some help with editor gadget.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: Need some help with editor gadget.
This idea worked perfect. Thank youIdeasVacuum wrote:Another possibility. If the Editor Gadget is the Active Gadget, Then use RemoveKeyboardShortcut() to stop the Window Event picking-up on the <Enter> key. When the Editor Gadget loses focus, re-create the Shortcut.

