Input text with first letter Capitalize

 



Procedure TForm1.Edit1KeyPress ( Sender : TObject ; Var Key : Char ) ;

Begin

   With Sender As TEdit Do

      If ( Text = '' ) Or ( Text[ SelStart ] = ' ' ) Or ( SelLength = Length ( Text ) ) Then

         If Key In [ 'a'..'z' ] Then

            Key := UpCase ( Key ) ;

End ;

 

Back Home Foward