Arsip: penggunaan checklistbox

 
user image
more 16 years ago

ru_kd

saya orang baru dalam delphi.:oops: saya mau menggunakan checklistbox.. cuma saya bingung, gimana memasukkan data dari suatu tabel ke dalam checklistbox ini. mohon bantuannya y thanks
user image
more 16 years ago

ImanD

sample simple:

begin
  with TTable do
  begin
    Close;
    TableName:='TableName'; // <-- name of table
    Open;
    if not IsEmpty then
      while not Eof do
      begin
        CheckListBox1.Items.Add(Fields[0].AsString);
        Next
      end;
  end;  
end;
atw bisa juga pke Query.
user image
more 16 years ago

ru_kd

untuk checklistbox1.items.add(fields[0].AsString) ada error too many actual parameter. :(
user image
more 16 years ago

ImanD

error...? aku cari error itu ko ga ketemu ya, xiixixixi! ni sample real pke TADOTable.....

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  with ADOTable1 do
  begin
    Close;
    TableName:='TPegawai';
    Open;
    if not IsEmpty then
      while not eof do
      begin
        CheckListBox1.Items.Add(Fields[0].AsString);
        Next
      end
  end
end;
masih error kah?
user image
more 16 years ago

ru_kd

thanks banget... saya udah mendapatkannya... ternyata gak bisa langsung add...harus di pake dulu btw saat ini saya pake PostgresDAC :) makasi y mas
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com