Sayfayı Yazdır | Pencereyi Kapat

Döngüyle Label Oluşturma

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=1325
Tarih: 13 Şubat 2026 Saat 14:44
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Döngüyle Label Oluşturma
Mesajı Yazan: sudee.tanerr
Konu: Döngüyle Label Oluşturma
Mesaj Tarihi: 13 Şubat 2026 Saat 10:50
Döngüyle kelimenin uzunluğu kadar label oluşturacağım fakat sadece bir tane oluşturabildim ve konumlarını yapamadım nasıl yapabilirim? https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" 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: kaanl0
Mesaj Tarihi: 13 Şubat 2026 Saat 12:02
Merhaba  döngüyle label oluşturduğumuz bir örnek yolluyorum. Labelleri yukardan aşağı dizmek için altop, soldan sağa dizmek için alleft vb kullanabilirsin. ( Soldan sağa dizeceğin zaman AddNewHorzScrollBox kullanmayı unutma ) Labeller arası boşluğu ise Marginler ile ayarlayabilirsin. Ayrıca;
https://www.docs.clomosy.com/index.php?title=TclFlowLayout" rel="nofollow - https://www.docs.clomosy.com/index.php?title=TclFlowLayout
https://www.docs.clomosy.com/index.php?title=TclGridLayout" rel="nofollow - https://www.docs.clomosy.com/index.php?title=TclGridLayout
incelemeni öneririm.

var
  MyForm: TclForm;
  MyScrollBox: TclVertScrollBox;
  MyLabel: TClProLabel;
  i: Integer;

{
  MyForm = TclForm.Create(Self);
  
  //Kaydırma Kutusu (Eğer liste uzarsa aşağı kaydırabilmek için)
  MyScrollBox = MyForm.AddNewVertScrollBox(MyForm, 'MyScrollBox');
  MyScrollBox.Align = alClient;
  
 //50 adet label
  for (i = 1 to 50)
  {

    // Önemli: Her etiketin adı benzersiz olmalı -> 'Lbl_1', 'Lbl_2' gibi
    MyLabel = MyForm.AddNewProLabel(MyScrollBox, 'Lbl_' + IntToStr(i), 'Satır Numarası: ' + IntToStr(i));
    

    MyLabel.Align = alTop;  
    MyLabel.Height = 50; 
    MyLabel.Margins.Top = 5;  
    MyLabel.Margins.Left = 10; 
    MyLabel.Margins.Right = 10;
    

    MyLabel.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#4DB6AC'); 
    MyLabel.clProSettings.FontColor = clAlphaColor.clWhite;
    MyLabel.clProSettings.FontSize = 18;
    MyLabel.clProSettings.RoundHeight = 10; 
    MyLabel.clProSettings.RoundWidth = 10;
    MyLabel.clProSettings.TextSettings.Font.Style = [fsBold];
    

    MyLabel.SetclProSettings(MyLabel.clProSettings);
  }

  MyForm.Run;
}

https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" 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