Sayfayı Yazdır | Pencereyi Kapat

Silme İşlemi Yapamıyorum

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Clomosy ile değişken kullanımı
Forum Tanımlaması: TRObject dili ile değişken tanımlaması ve ekranda gösterme
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1197
Tarih: 22 Eylül 2025 Saat 14:57
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Silme İşlemi Yapamıyorum
Mesajı Yazan: Gökçe ulusoy
Konu: Silme İşlemi Yapamıyorum
Mesaj Tarihi: 22 Eylül 2025 Saat 10:21
var 
  form1:TclForm;
  Button,Button1:TclProButton;
  testCheckBox:TclCheckBox;
  panel:TclProPanel;
  testCombo:TClComboBox;
  testedit:TclProEdit
  testpanel:TclProPanel;
  List1:TclStringList;
  i,Pos:Integer;
  newCheckBox: TclCheckBox;
  newLabel:TClProLabel;
  
  /*
  void Yapilacaklar
  {
   
    if (Length(testedit.text)<>0)
    {
     testCombo.AddItem(testedit.text,'01');
     ShowMessage('Yapılacaklar listesine eklendi.');
     List1 = Clomosy.StringListNew;
     List1.Capacity = 5;
     List1.Add(testCombo.GetItemIndex(testCombo.ItemIndex));
     
     For i=0 to Length(testedit.text)
     {
     newCheckBox = form1.AddNewCheckBox(testpanel, 'chk_' + IntToStr(List1.Count), testedit.text);
     newCheckBox.Align = alTop;
     newCheckBox.Margins.Top = 5;
     newCheckBox.Margins.Left = 20;
     newCheckBox.TextSettings.Font.Size = 14; // İsteğe göre boyutu ayarla
     newCheckBox.TextSettings.FontColor = clAlphaColor.clHexToColor('#d2aa19');
     }
    }
  }
  */
  void Yapilacaklar
    {
      if (Length(testedit.text) <> 0)
      {
        testCombo.AddItem(testedit.text, '01');
        ShowMessage('Yapılacaklar listesine eklendi.');
        
        // List1’i sadece ilk kez oluşturun, her çağrıda yeniden oluşturmayın
        if  (not Assigned(List1)) 
        {
          List1 = Clomosy.StringListNew;
          List1.Capacity = 5;
        };
        List1.Add(testCombo.GetItemIndex(testCombo.ItemIndex));
    
        // Yeni bir checkbox ekle, benzersiz isimle
        newCheckBox = form1.AddNewCheckBox(testpanel, 'chk_' + IntToStr(List1.Count), testedit.text);
        newCheckBox.Align = alTop;
        newCheckBox.Margins.Top = 5;
        newCheckBox.Margins.Left = 20;
        newCheckBox.TextSettings.Font.Size = 14;
        newCheckBox.TextSettings.FontColor = clAlphaColor.clHexToColor('#d2aa19');
      }
    }

  void ComboSelected
    var
      strValue,strKey : String;
    {
      strValue = testCombo.GetValueIndex(testCombo.ItemIndex);
      strKey = testCombo.GetItemIndex(testCombo.ItemIndex);
      //strKey2 = testCombo.Items[testCombo.ItemIndex];
      ShowMessage('strValue : '+strValue); //value1
      ShowMessage('strKey : '+strKey); //key
      Delete(strKey,1,Pos(strKey,strKey));
      ShowMessage('listeden kaldırıldı.');
     
      
    }
  
    
  {
    //form ve özellikleri
    form1=TclForm.Create(self);
    form1.SetFormColor('#a6b3f7','#0d32e7',clGHorizontal);
    form1.SetFormBGImage(' https://resmim.net/cdn/2025/09/18/jdNWJc.png" rel="nofollow - https://resmim.net/cdn/2025/09/18/jdNWJc.png ');
    form1.clSetWindowState(fwsNormal);
    form1.clSetPosition(fpScreenCenter);
    form1.AddNewVertScrollBox(form1,'Test');
    form1.clSetCaption('Deneme Uygulaması');
    
    //Button ve özellikleri
    Button=form1.AddNewProButton(form1,'Button','EKLE');
    Button.Align=AlBottom;
    Button.Width= 100;
    Button.height=50;
    Button.clProSettings.TextSettings.Font.Style=[fsItalic];
    Button.clProSettings.FontColor=clAlphaColor.clHexToColor('#262e5a');
    Button.clProSettings.FontSize=20;
    Button.clProSettings.fontVertAlign=palcenter;
    Button.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#fbeaea');
    Button.clProSettings.BorderColor = clAlphaColor.clHexToColor('#001c8a');
    //kenar rengi ayarlayamadım neden?
    Button.clProSettings.IsFill = False;
    Button.clProSettings.IsRound = True;
    Button.clProSettings.RoundHeight = 20;
    Button.clProSettings.RoundWidth = 20;
    Button.SetclProSettings(Button.clProSettings);
    //Button1 özellikleri
    Button1=form1.AddNewProButton(form1,'Button1','Sil');
    Button1.Align=alMostBottom;
    Button1.Width=100;
    Button1.height=50;
    Button1.Margins.Top=5;
    Button1.SetclProSettings(Button.clProSettings);
    
    //ComboBox özellikleri
    testCombo=form1.AddNewComboBox(form1,'testCombo');
    testCombo.Align = alTop;
    testCombo.Width = 150;
    testCombo.Margins.Top=20;
    testCombo.Margins.Left =50;
    testCombo.Margins.Right =50;
    
    
    //TclProPanel özelleştirme
    testpanel = form1.AddNewProPanel(form1,'testPanel'); 
    testpanel.align=AlCenter;
    testpanel.Width=600;
    testpanel.height=300;
    testpanel.Margins.Left =100;
    testpanel.Margins.Right =100;
    testpanel.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#def5d6');
    testpanel.clProSettings.BorderColor=clAlphaColor.clHexToColor('#b3f29c');
    testpanel.clProSettings.IsRound = True;
    testpanel.clProSettings.IsTransparent = True;
    testpanel.clProSettings.RoundHeight = 5;
    testpanel.clProSettings.RoundWidth = 5;
    testpanel.SetclProSettings(testpanel.clProSettings);
    
    //CheckBox ekleme:
    /*
    testCheckBox = form1.AddNewCheckBox(testpanel,'testCheckBox','test');
    testCheckBox.Align=alTop;
    testCheckBox.Margins.Top=5;
    testCheckBox.Margins.Left=20;
    //testCheckBox.Width=100;
    //testCheckBox.height=100;
    testCheckBox.TextSettings.Font.Size = 100;
    testCheckBox.TextSettings.FontColor = clAlphaColor.clHexToColor('#d2aa19');
    testCheckBox.TextSettings.HorzAlign = taLeading;
    */
    //edit özellikleri.
    testedit=form1.AddNewProEdit(form1, 'testedit', 'Bugün yapılacakları yazınız: ');
    testedit.align=alMostTop;
    testedit.Width=150;
    testedit.height=30;
    testedit.clProSettings.BorderColor=clAlphaColor.clHexToColor('#002aff');
    testedit.Margins.Top=10;
    testedit.Margins.Left =100;
    testedit.Margins.Right =100;
    testedit.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic];
    testedit.clProSettings.RoundHeight = 5;
    testedit.clProSettings.RoundWidth = 5;
    testedit.clProSettings.FontColor=clAlphaColor.clHexToColor('#222325');
    testedit.clProSettings.IsFill = True; 
    testedit.clProSettings.IsRound = True;
    testedit.SetclProSettings(testedit.clProSettings);
     
    //Label özelleştirme
    newLabel=form1.AddNewProLabel(testpanel, 'newLabel', 'Bugün Yapılacaklar listesi');
    newLabel.align=alMostTop;
    newLabel.Margins.Top=5;
    newLabel.Margins.Left=20;
    newLabel.Width=150;
    newLabel.height=50;
    newLabel.clProSettings.FontSize=15;
    newLabel.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic];
    newLabel.clProSettings.RoundHeight = 5;
    newLabel.clProSettings.RoundWidth = 5;
    newLabel.clProSettings.FontColor=clAlphaColor.clHexToColor('#262e5a');
    newLabel.clProSettings.IsFill = True; 
    newLabel.clProSettings.IsRound = True;
    newLabel.SetclProSettings(newLabel.clProSettings);
    
    
    
    
    form1.AddNewEvent(Button,tbeOnClick, 'Yapilacaklar');
    form1.AddNewEvent(Button1,tbeOnClick, 'ComboSelected');
    

    form1.Run;
    
  }
Listede yazdığım veriyi checkbox ve Combobox üzerinde silmek istiyorum ama yapamıyorum. Nasıl bir yol izlemeliyim.



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