procedure TfrmJxZd.edtCalCodeChange(Sender: TObject);
var str :String;
begin
inherited;
str := (Sender as TEdit).Text;
(Sender as TEdit).Text := UpperCase(str);
(Sender as TEdit).SelStart := length(str);
var str :String;
begin
inherited;
str := (Sender as TEdit).Text;
(Sender as TEdit).Text := UpperCase(str);
(Sender as TEdit).SelStart := length(str);
end;
做了一个在修改后变为大写。然后光标位置放置在最后。不然会在最前。