Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editbox line jump disabled 2

Status
Not open for further replies.

Paco75

Programmer
Oct 11, 2001
239
US
Hi,

Im calling a old form from another program (not made by me) and after this form is released in my program the enter key in editbox is not working, it does not jump a line as it is supposed to do. I can type characters as usual except ENTER.

The problem is i dont know what command could have disabled the enter like this... i searched for the SET COMMANDS but none of them seems to have this effect.

What command can prevent line jumps like this?
 
i found that INSERT is set to off actually. what is the command to set it on/off?
 
I don't think you can set INS on or off programmatically in VFP, and in any case, you should not do that.

The INS key is under user control, and a well-behaved program should respect the user's choice for its setting.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike, Mike, Mike....

Code:
Insmode(<expL>)

goes back at least to dBaseIII. To toggle it from whatever it is currently:

Code:
Insmode(!Insmode())

(I agree you shouldn't do it. Along with Capslock() and Numlock() it's a USER setting.)

Turning off ENTER could be done with ON KEY LABEL, but that would apply globally. It wouldn't neatly restrict itself to edit fields.
 
INSMODE() that was what i needed. I found it in the subform.

Thanks!
 
All three of the functions I mentioned (Insmode(), Capslock(), and Numlock()) seem like a good idea at the time but invariably cause unpredictable side effects (such as in this thread).

One of the more colorful tech support calls I took for the original Codebook came about because the framework issued Numlock(.t.) in setup code. On some early notebooks, it had the unintended side effect of activating the embedded numeric keypad in the main keyboard. Users would get numbers when typing and couldn't understand why.

We took that out. <g>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top