var Myform : TclForm; userPhoto,malePhoto1,malePhoto2,malePhoto3,femalePhoto1,femalePhoto2,femalePhoto3: TClProImage; photoList : TCLProListView; DesignerPanel : TClListViewDesignerPanel; taskImg : TclProImage; taskName : TClProLabel;
void CreateListView { photoList = Myform.AddNewProListView(Myform,'photoList'); photoList.Align = alRight; photoList.Margins.Bottom = 20; photoList.Margins.Top = 20; photoList.clProSettings.ViewType = lvIcon; //(lvList, lvIcon, lvWaterFall) photoList.clProSettings.ColCount = 1; photoList.clProSettings.ItemHeight = 100; photoList.clProSettings.ItemSpace = 10; photoList.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#FFFCFF'); photoList.clProSettings.BorderColor = clAlphaColor.clHexToColor('#66FF7F'); photoList.clProSettings.BorderWidth = 2; photoList.clProSettings.RoundHeight = 5; photoList.clProSettings.RoundWidth = 5; photoList.SetclProSettings(photoList.clProSettings); }
void CreateDesignerPanel { DesignerPanel = Myform.AddNewProListViewDesignerPanel(photoList, 'DesignerPanel'); DesignerPanel.Height = 100; DesignerPanel.Width = 100; DesignerPanel.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#B3FCE5'); DesignerPanel.clProSettings.BorderColor = clAlphaColor.clHexToColor('#16FF8C'); DesignerPanel.clProSettings.BorderWidth = 2; DesignerPanel.clProSettings.RoundHeight = 20; DesignerPanel.clProSettings.RoundWidth = 20; DesignerPanel.SetclProSettings(DesignerPanel.clProSettings); photoList.SetDesignerPanel(DesignerPanel); }
void CreateData; { taskImg = Myform.AddNewProImage(DesignerPanel, 'taskImg'); taskImg.Align = AlLeft; taskImg.Margins.Top = 10; taskImg.Margins.Bottom = 10; DesignerPanel.AddPanelObject(taskImg, clImage1); Myform.AddNewEvent(photoList,tbeOnItemClick,'TaskClick'); }
void AddDataToListView; { photoList.clLoadProListViewDataFromDataset(Clomosy.ClDataSetFromJSON('[ {"taskImg" : "https://i.imgur.com/m5V9b4x.png"}, {"taskImg" : "https://i.imgur.com/LQ4J4dh.png"}, {"taskImg" : "https://i.imgur.com/w9lmYul.png"}, {"taskImg" : "https://i.imgur.com/b9jWqJK.png"}, {"taskImg" : "https://i.imgur.com/KUMAPMj.png"}, {"taskImg" : "https://i.imgur.com/4k2JH97.png"} ]')); }
void listAyarla; { CreateListView; CreateDesignerPanel; CreateData; AddDataToListview; }
void TaskClick(item); var selectedPhotoUrl : string; { selectedPhotoUrl = item.GetProImage('taskImg').clProSettings.PictureSource; userPhoto.clProSettings.PictureSource = selectedPhotoUrl; userPhoto.SetclProSettings(userPhoto.clProSettings); photoList.Visible = false; }
{ MyForm = TclForm.Create(Self);
userPhoto = MyForm.AddNewProImage(MyForm,'userPhoto'); userPhoto.Align = alCenter; userPhoto.Height = 100; userPhoto.Margins.Bottom = 600; userPhoto.Margins.Left = 200; userPhoto.clProSettings.PictureSource = 'https://i.imgur.com/38uoXIt.png'; userPhoto.SetclProSettings(userPhoto.clProSettings); MyForm.AddNewEvent(userPhoto,tbeOnClick,'listAyarla');
MyForm.Run; }
Listviewdeki fotoğrafı seçtiğimde sayfadaki userPhoto resminin yerini almasını istiyorum fakat hata alıyorum.
------------- furkanfidan
|