Topic: using namecase

Hi Dmitry,
I use the 'namecase' function to capitalise the first letter of names automatically.
If I associate it with an 'on exit' event, it works.  However, users may just hit 'enter' to save rather than exiting the field first in which case the script does not execute.
So I have tried associating 'namecase' with an 'on change' event.  Yes, it works........BUT the value entered then goes from right to left instead of left to right (please see attached).
Is this something you can fix?
Thanks,
Derek.

Post's attachments

Attachment icon namecase.zip 335.4 kb, 429 downloads since 2017-08-15 

Re: using namecase

Hello.


Check it out

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    form1.edit1.text := namecase(form1.edit1.text);
end;

Also you can disable properties Default = False of TextBox so when user hit 'enter' it's not saving record.

Dmitry.

Re: using namecase

Hi Dmitry,
Thanks for the reply,
Can't 'namecase' be added as a dropdown value for the 'charcase' object property for edit fields?
That would be one less thing that requires scripting.
Derek.

Re: using namecase

derek wrote:

Hi Dmitry,
Thanks for the reply,
Can't 'namecase' be added as a dropdown value for the 'charcase' object property for edit fields?
That would be one less thing that requires scripting.
Derek.

Hello.


Unfortunately not.

Dmitry.