Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine Significant Trailing Spaces in controls
Message
From
03/08/2007 16:45:23
 
 
To
03/08/2007 03:49:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01245320
Message ID:
01245902
Views:
26
>After some thought I realize that this could most likely be done much easier if you simply let keypress change spaces into some other character, like chr(168) as you suggest. Something like this in keypress should do the trick:
>
>If nKeyCOde=32
> NoDefault
> DoDefault(168, nShiftAltCtrl)
>EndIf
>
>BTW, are you aware that chr(255) looks just like chr(32) with many fonts?

I had tried that as my first attempt. But when I typed a space, no output would be sent to the display value. I could tell that the space was being trapped and the dodefault was being called, but no output would occur. I guess for the dropdown combobox that there is a bug in the dodefault call.

I had tried 255, but for the Arial font, it is a y with two dots above it, so that character didn't work. I tried the FoxFont but the point size did not work well with the display. I have not experimented with other fonts as the normal font that I use in the forms is Arial. I have thought about creating a custom Arial font (I have a font editor) and modify the 168 char to look more like a space (probably have to have something in it to keep the control from trimming it).
Previous
Reply
Map
View

Click here to load this message in the networking platform