Tabbi ki. Aşağıda Veri Listeleme Unit'indeki tüm kodları ekledim.
var uVeriListeleme: TCLForm; uProfilSayfasi, uVeriAnalizi, uVeriEkleme: TclUnit; panel: TclProPanel; btn1, btn2, btn3, btn4 : TClProButton; designerPanel : TClListViewDesignerPanel; isim,kategori,fiyat,parabirimi : TClProLabel; listview : TClProListView; searchEdit : TClProSearchEdit;
void Search; { searchEdit = uVeriListeleme.AddNewProSearchEdit(uVeriListeleme, 'searchEdit', 'Ürün Ara'); searchEdit.Align = alTop; searchEdit.Margins.Top = 15; searchEdit.Margins.Left = 5; searchEdit.Margins.Right = 5; searchEdit.Margins.Bottom = 10; searchEdit.Height = 40; }
void CreateListView; { listView = uVeriListeleme.AddNewProListView(uVeriListeleme,'listView'); listView.clProSettings.ItemSpace = 10; listView.clProSettings.IsFill = True; listView.Height = uVeriListeleme.clheight*95/100;
listView.clProSettings.IsRound = True;
listView.Align=alBottom; listView.clProSettings.RoundHeight = 5; listView.clProSettings.RoundWidth = 5; listView.clProSettings.BorderColor =clAlphaColor.clHexToColor('#88c394'); listView.clProSettings.BorderWidth = 2; listView.clProSettings.ItemHeight = 705; listView.clProSettings.ColCount = 1; listView.SetclProSettings(listView.clProSettings); searchEdit.TargetListView = ListView; }
void CreateDesignerPanel; { designerPanel = uVeriListeleme.AddNewProListViewDesignerPanel(listView, 'designerPanel'); clComponent.SetupComponent(designerPanel, '{"Height":5, "BackgroundColor":"#e2deed", "RoundHeight":20, "RoundWidth":20}'); listView.SetDesignerPanel(designerPanel); }
void CreateData; { isim=uVeriListeleme.AddNewProLabel(designerPanel, 'isim', 'isim'); isim.clProSettings.FontVertAlign = palLeading; isim.Align=alTop; isim.Margins.Top=5; isim.Margins.Left=5; isim.clProSettings.AutoSize=True; isim.clProSettings.WordWrap=True; isim.clProSettings.FontColor =clAlphaColor.clHexToColor('#000000'); isim.SetclProSettings(isim.clProSettings); DesignerPanel.AddPanelObject(isim, clCaption); kategori=uVeriListeleme.AddNewProLabel(designerPanel, 'kategori', 'kategori'); kategori.clProSettings.FontVertAlign = palLeading; kategori.Align=alTop; kategori.Margins.Top=5; kategori.Margins.Left=5; kategori.clProSettings.AutoSize=True; kategori.clProSettings.WordWrap=True; kategori.clProSettings.FontColor =clAlphaColor.clHexToColor('#000000'); kategori.SetclProSettings(kategori.clProSettings); DesignerPanel.AddPanelObject(kategori, clText); fiyat=uVeriListeleme.AddNewProLabel(designerPanel, 'fiyat', 'fiyat'); fiyat.clProSettings.FontVertAlign = palLeading; fiyat.Align=alTop; fiyat.Margins.Top=5; fiyat.Margins.Left=5; fiyat.clProSettings.AutoSize=True; fiyat.clProSettings.WordWrap=True; fiyat.clProSettings.FontColor =clAlphaColor.clHexToColor('#000000'); fiyat.SetclProSettings(fiyat.clProSettings); DesignerPanel.AddPanelObject(fiyat, clText); parabirimi=uVeriListeleme.AddNewProLabel(designerPanel, 'parabirimi', 'parabirimi'); parabirimi.clProSettings.FontVertAlign = palLeading; parabirimi.Align=alTop; parabirimi.Margins.Top=5; parabirimi.Margins.Left=5; parabirimi.clProSettings.AutoSize=True; parabirimi.clProSettings.WordWrap=True; parabirimi.clProSettings.FontColor =clAlphaColor.clHexToColor('#000000'); parabirimi.SetclProSettings(parabirimi.clProSettings); DesignerPanel.AddPanelObject(parabirimi, clText); }
void AddDataToListView; { listView.clLoadProListViewDataFromDataset(Clomosy.ClDataSetFromJSON( '[ {"isim": "cikolata", "kategori": "yiyecek","fiyat": "30","parabirimi": "TL"}, {"isim": "oje", "kategori": "kisiselbakim","fiyat": "80","parabirimi": "TL"}, {"isim": "pantolon", "kategori": "giyim","fiyat": "1000","parabirimi": "TL"} ]')); }
void CreateListView; { listview = uVeriListeleme.AddNewProListView(uVeriListeleme, 'listtView'); clComponent.SetupComponent(listView,'{ "Align": "alClient", "Width":69, "Height":150, "RoundHeight":10, "RoundWidth":10, "BorderWidth":2 "listType":"Cart", "ItemColumnCount" : 2, "ItemHeight" : 150, "ItemWidth":150, "Backgroundcolor":"#88c394", "BorderColor":"#8e8fde"}');
listView.Properties.ItemSpace = 10;
}
void MesajGoster; { ShowMessage('Zaten Veri Listeleme Sayfasindasin'); }
void GoToProfilSayfasi; { uVeriListeleme.clShow; uProfilSayfasi.UnitName = 'uProfilSayfasi'; uProfilSayfasi.CallerForm = uVeriListeleme; uProfilSayfasi.Run; }
void GotoVeriAnalizi; { uVeriListeleme.clShow; uVeriAnalizi.UnitName = 'uVeriAnalizi'; uVeriAnalizi.CallerForm = uVeriListeleme; uVeriAnalizi.Run; }
void GoToVeriEkleme; { uVeriListeleme.clShow; uVeriEkleme.UnitName = 'VeriEkleme'; uVeriEkleme.CallerForm = uVeriListeleme; uVeriEkleme.Run; }
{
uVeriListeleme = TCLForm.Create(Self);
uProfilSayfasi = TclUnit.Create; uVeriEkleme = TclUnit.Create; uVeriAnalizi = TclUnit.Create;
panel = uVeriListeleme.AddNewProPanel(uVeriListeleme,'panel'); clComponent.SetupComponent(panel,'{ "Align" : "alMostBottom", "Width" :360, "Height":20, "RoundHeight":10, "RoundWidth":10, "Backgroundcolor": "#e2deed"}'); panel.Align = alMostBottom;
btn1 = uVeriListeleme.AddNewProButton(panel, 'btn1', ''); clComponent.SetupComponent(btn1,'{"RoundHeight":10,"Width":69,"Height":45,"Backgroundcolor":"#ffffff", "RoundWidth":10,"BorderColor":"#8e8fde","BorderWidth":2,"Imgurl":" https://clomosy.com/assets/images/1024x500.png" rel="nofollow - https://clomosy.com/assets/images/1024x500.png" ,"ImgFit":"yes" }'); btn1.Margins.Right = 290; uVeriListeleme.AddNewEvent(btn1,tbeOnClick,'GoToProfilSayfasi');
btn2 = uVeriListeleme.AddNewProButton(panel, 'btn2', ''); clComponent.SetupComponent(btn2,'{"RoundHeight":10,"Width":69,"Height":45,"Backgroundcolor":"#ffffff", "RoundWidth":10,"BorderColor":"#8e8fde","BorderWidth":2,"Imgurl":" https://clomosy.com/assets/images/1024x500.png" rel="nofollow - https://clomosy.com/assets/images/1024x500.png" ,"ImgFit":"yes" }'); btn2.Margins.Right = 145; uVeriListeleme.AddNewEvent(btn2,tbeOnClick,'GoToVeriEkleme');
btn3 = uVeriListeleme.AddNewProButton(panel, 'btn3', ''); clComponent.SetupComponent(btn3,'{"RoundHeight":10,"Width":69,"Height":45,"Backgroundcolor":"#ffffff", "RoundWidth":10,"BorderColor":"#8e8fde","BorderWidth":2,"Imgurl":" https://clomosy.com/assets/images/1024x500.png" rel="nofollow - https://clomosy.com/assets/images/1024x500.png" ,"ImgFit":"yes" }'); btn3.Margins.Left = 0; uVeriListeleme.AddNewEvent(btn3,tbeOnClick,'MesajGoster');
btn4 = uVeriListeleme.AddNewProButton(panel, 'btn4', ''); clComponent.SetupComponent(btn4,'{"RoundHeight":10,"Width":69,"Height":45,"Backgroundcolor":"#ffffff", "RoundWidth":10,"BorderColor":"#8e8fde","BorderWidth":2,"Imgurl":" https://clomosy.com/assets/images/1024x500.png" rel="nofollow - https://clomosy.com/assets/images/1024x500.png" ,"ImgFit":"yes" }'); btn4.Margins.Left = 145; uVeriListeleme.AddNewEvent(btn4,tbeOnClick,'GotoVeriAnalizi');
CreateListView; CreateDesignerPanel; CreateData; AddDataToListView; Search; uVeriListeleme.Run; }
|