Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 14 of 14 total
Thread TEdit UPPERCASE data entry
Fri, Aug 7 2015 3:49 PMPermanent Link

Malcolm Taylor

Tim Young [Elevate Software] wrote:

> Trinione wrote:
>
> << Could this be a future TEdit Property (Version 2.04) ? It would be
> easier to set a property on a field like this rather than having to
> do it by code. >>
>
> Yeah, I'll probably add some formatting to the inputs when I deal
> with some of the TDataSet limitations.
>

I had a play with Android Studio some time last year and noticed that
its TEdit had formatting properties including (from memory) upper/lower
case plus Sentence and Word (initial) caps.
Mon, Aug 10 2015 5:03 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

I made one procedure hoofdletters that I put in the OnChange event from a TEdit or TEditCombobox (or any other you want to uppercase)


procedure TForm1.Hoofdletters(sender: TObject);
begin
TEdit(Sender).text:=UPPERCASE(TEdit(Sender).text);
TEditComboBox(Sender).text:=UPPERCASE(TEditComboBox(Sender).text);
end;





Trinione wrote:

Hi:
How can data be captured in UPPERCASE using the TEdit component?

I am trying to use the KeyPress event with no success.

function TfrmMain.edtLastNameKeyPress(Sender: TObject; Key: Char; ShiftKey, CtrlKey, AltKey: Boolean): Boolean;
begin
 Key := UpperCase(Key)[1];
 result := true;
end;
Mon, Aug 10 2015 10:26 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Malcolm,

<< I had a play with Android Studio some time last year and noticed that its TEdit had formatting properties including (from memory) upper/lower case plus Sentence and Word (initial) caps. >>

Yes, I'm sure that it can be done in other environments.  The issue here is that the browser *forces* you to replace the internal input value on every keystroke in order to affect the formatting, as opposed to a per-keystroke filtering capability.  This can "change" event recursion (and related) issues.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Aug 10 2015 10:26 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Malcolm,

That should be "can cause"...

Tim Young
Elevate Software
www.elevatesoft.com
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image