public void togglePhotoListSelection(PhotoListItem clickedItem) { foreach (PhotoListItem listItem in panelSegmentPhotosList.Controls) { listItem.BorderStyle = BorderStyle.None; } clickedItem.BorderStyle = BorderStyle.FixedSingle; textBoxPhotoFile.Text = clickedItem.labelPicture.Text; }
private void populatePhotoList() { panelSegmentPhotosList.Controls.Clear(); int rowIndex = 0; foreach (string photo in listOfPhotos) { PhotoListItem newItem = new PhotoListItem(this, photo, (rowIndex * 30) + 3, panelRoad.currentFolder); panelSegmentPhotosList.Controls.Add(newItem); rowIndex++; } }