Topic: Capitalizing First Letter of Words in a Text Field
Is there a function or anyway to capitalize the first letter of each word in a text field? ie names and addresses.
My Visual Database → Script → Capitalizing First Letter of Words in a Text Field
Is there a function or anyway to capitalize the first letter of each word in a text field? ie names and addresses.
Hello EHWagner,
Something like this might do the trick for you -
procedure Form1_Edit1_OnExit (Sender: string);
begin
form1.edit1.text := namecase(form1.edit1.text);
end;
Derek.
Hello Dmitry,
Could NameCase be added as a new option to the CHARCASE object property for text fields (in addition to ecLowerCase, ecNormal and ecUpperCase) instead of having to do it by script?
Thanks,
Derek.
Hello Derek and Dmitry
NameCase works fine with event Form1.Button1.OnExit (so does it also with Form1.Button1.Click);
But curiously, when placed behind events OnChange or OnKeyPress, text enterd in EditBox is inverted
(Hello World becomes Dlrow Olleh)
Any explanation about this anomaly ?
JB
Perfect. Thank you Derek. Yes it definitely needs to be added as a property.
My Visual Database → Script → Capitalizing First Letter of Words in a Text Field
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi