Sayfayı Yazdır | Pencereyi Kapat

Tcl Bileşenleri

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Genel İşlemler
Forum Tanımlaması: TRObject dili ile programlama yaparken karşılaşılan genel işlemler
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1460
Tarih: 22 Haziran 2026 Saat 12:00
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Tcl Bileşenleri
Mesajı Yazan: ltfiyepinar
Konu: Tcl Bileşenleri
Mesaj Tarihi: 03 Mayıs 2026 Saat 14:49
Clomosy ana kodunda oluşturulan SQLite veritabanındaki verileri bir TclComboBox bileşenine nasıl bağlayabiliriz? https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516" integrity="sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">










Cevaplar:
Mesajı Yazan: Emr.Erkmn
Mesaj Tarihi: 03 Mayıs 2026 Saat 22:13
Merhaba Lütfiye 

Bunun için bir örnek hazırladım sana umarım yardımcı olur 

var
  MyForm: TclForm;
  CmbKullanicilar: TclComboBox;
  VeriSorgusu: TclSQliteQuery;

void VeritabaniniHazirla;
{
  Clomosy.DBSQLiteConnect(Clomosy.AppFilesPath + 'BenimVeritabanim.db', '');
  
  Clomosy.DBSQLiteQuery.Sql.Text = 'CREATE TABLE IF NOT EXISTS Kullanicilar (ID INTEGER PRIMARY KEY AUTOINCREMENT, KullaniciAdi VARCHAR(50))';
  Clomosy.DBSQLiteQuery.OpenOrExecute;
  
  Clomosy.DBSQLiteQuery.Sql.Text = 'DELETE FROM Kullanicilar';
  Clomosy.DBSQLiteQuery.OpenOrExecute;
  
  Clomosy.DBSQLiteQuery.Sql.Text = 'INSERT INTO Kullanicilar (KullaniciAdi) VALUES (''Ali Yılmaz''), (''Ayşe Demir''), (''Mehmet Kaya'')';
  Clomosy.DBSQLiteQuery.OpenOrExecute;
}

// VERİLERİ COMBOBOX BİLEŞENİNE BAĞLAMA
void ComboBoxaVeriYukle;
{
  VeriSorgusu = TclSQliteQuery.Create(Nil);
  VeriSorgusu.Connection = Clomosy.DBSQLiteConnection;
  
  VeriSorgusu.Sql.Text = 'SELECT ID, KullaniciAdi FROM Kullanicilar';
  VeriSorgusu.OpenOrExecute;
  
  CmbKullanicilar.Clear;
  
  while (not VeriSorgusu.EOF)
  {
    CmbKullanicilar.AddItem(VeriSorgusu.FieldByName('KullaniciAdi').AsString, VeriSorgusu.FieldByName('ID').AsString);
    
    VeriSorgusu.Next;
  }
  
  VeriSorgusu.Free;
}

{
  MyForm = TclForm.Create(Self);
  MyForm.SetFormColor('#F8FAFC', '', clGNone);
  
  VeritabaniniHazirla;
  
  CmbKullanicilar = MyForm.AddNewComboBox(MyForm, 'CmbKullanicilar');
  CmbKullanicilar.Align = alTop;
  CmbKullanicilar.Margins.Top = 50;
  CmbKullanicilar.Margins.Left = 20;
  CmbKullanicilar.Margins.Right = 20;
  
  ComboBoxaVeriYukle;
  
  MyForm.Run;
}
https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516" integrity="sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net