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">
|