Arsip: Change case di Tedit


by nickqin in Serba Neka more 17 years ago 6808
Cukup merepotkan bila kita harus menekan tombol shift maupun caps lock bila ingin menuliskan huruf besar di awal kalimat pada tedit, untuk mengatasinya coba aja kode berikut :)
procedure TForm1.Edit1Change(Sender: TObject);
var
OldStart : Integer;
begin
With Edit1 do
if Text <> '' then begin
OnChange := NIL;
OldStart := SelStart;
Text := UpperCase(Copy(Text,1,1))+LowerCase(Copy(Text,2,Length(Text)));
SelStart := OldStart;
OnChange := Edit1Change;
end;
end;


selamat mencoba
tapi jika ingin yang setelah spasi jg jadi huruf besar coba aja di
http://nickqin.wordpress.com/

Coinfest

Pascal Indonesia is Coinfest Asia 2024's official community partner! 🀝
β˜€οΈ Take part in Asia’s immersive Web3 festival, where innovation meets adoption.
🎟 Get your tickets at www.coinfest.asia and use our special promo code : CA24PASCALINDO to get 10% off!

Why Coinfest Asia?
● Unconventionally Engaging
Our immersive setting and programming leave you with more memory markers than any other event
● Dive into Emerging Markets
Get connected in Southeast Asia; the fastest-growing Web3 region in the world
● Jump straight into Adoption
Foster collaborations directly in Indonesia where there are 437k new crypto users each month

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com