Arsip: Tips : Editbox untuk nominal uang

 
user image
more 17 years ago

boy_borland

kalo mo buat text area khusus nominal uang sebenernya sih bisa diatur pake mask edit... tapi kalo ada yang anti :? sama MaskEdit, cobain ini deh...

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
  // Memastikan karakter yang diinput adalah '0'..'9'
  if not (key in[#8,'0'..'9'])then
  begin
    key:=#0;
    beep;
  end;
end;
procedure TForm1.Edit1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var
  s:string;
  i,l:integer;
begin
  // Sisip karakter '.'
  s:=edit1.Text;
  for i:=1 to length(s) do
  begin
    if s[i]='.' then
    begin
      delete(s,i,1);
    end;
  end;
  l:=length(s);
  if (length(s)>3) then
  begin
    for i:=1 to (length(s) div 3) do
    begin
      l:=l-2;
      if l<>1 then
        insert('.',s,l);
      l:=l-1;
    end;
  end;
  edit1.Text:=s;
  edit1.SelStart:=length(edit1.Text);
end;
user image
more 17 years ago

cyber_hecker

lumayan seh... tapi waktu ku coba terdapat beberapa kekurangan : 1. gimana kalo kita ingin memasukkan pecahan berkoma ? mosok harus bulat terus ? 2. gak bisa di blok neh nilainya ([SHIFT]+[TOMBOL PANAH]) 3. tombol panah juga gak berfungsi, kalo mau nyisipin angka gimana ? yup segitu aja sedikit kekurangan yang ku temukan. semoga bisa menambah masukan dan ide untuk yang berikutnya. nb : cuma bisa ngeritik, tapi gak bisa mberi jalan keluar neh :oops: kekekeke :P.
user image
more 17 years ago

boy_borland

coba Proc edit1KeUp diganti aja sama edit1Change, kayanya itu deh pengaruhnya... tanx bgt yah buat cyber_hecker yang funky abis atas masukannya...
user image
more 17 years ago

EkoIndri

kalau menurutku yang simple dan enak adalah dengan menggunkan format FormatFloat
user image
more 17 years ago

boy_borland

wah, kayanya mas eko tau nih cara yang lebih simpel.. kasih tau yah mas contohnya... jarang sih pake FormatFloat
user image
more 17 years ago

grounders

bukannya Eko dah pernah mbahas ni thread... ad contohnya sgala, ,alahan dah ada revisi dari aku ma kang cyber
user image
more 17 years ago

SnipSnip

sy coba search, nemu ini: tentang ratakanan: http://pascal-id.org/dpr/PNphpBB2-viewtopic-t-457-highlight-currency.pas tentang terbilang: http://pascal-id.org/dpr/PNphpBB2-viewtopic-t-135-highlight-terbilang.pas
user image
more 17 years ago

EkoIndri

sip2........ kalau bisa jangan buat thread yang dah pernah dihahas yah........ kecuali thread itu lom terpecahkan
user image
more 17 years ago

boy_borland

siap boss... kayanya gw musti liat2 dulu nih thread yg sblumnya... tp ngomong2 pertanyaan gw diatas yg buat mas Eko blom dijwb tuh... gmana mas pake FormatFloat buat ubah bil 100000 or 11000000 jadi 100.000 n 11.000.000.. ga tau nih syntax-nya, tanx yah... tuk referensi dari SnipSnip yg di http://pascal-id.org/dpr/PNphpBB2-viewt ... rrency.pas klo bisa ksh contoh pake FormatFloat dong... tuk yg di http://pascal-id.org/dpr/PNphpBB2-viewt ... bilang.pas kayanya ga nyambung deh... tp gw juga butuh tuh code-nya... tanx yah SnipSnip...
user image
more 17 years ago

saysansay

coba test dech yg punya diriku kira seperti ini tampilannya nga usah pakecoding2an segala wakakakaka basi tuh coding hahahahah Klu mau coba download disini wakakakakak www.uploadtemple.com/view.php/1135791375.rar Moga menikmati hiks..hiks...hiks... Nb : solusinya tinggal pake komponent tambahan wakakakakakak
more ...
  • Pages:
  • 1
  • 2
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com