I open to alternate suggestions if anyone has a better idea.
I am creating a win form to allow users to add files that they want to attach to an auto generated email. I'd LIKE the form to add an icon with the file name under it when they add a file. I'd also like to allow them to 'select' the icon and click a delete button when I'm done.
I figure if I can find a way to display a selectable image I should be able to dynamically create the icons and labels. Then If they want to delete one they can select the image and I can use the name of that dynamically created image to remove the file from the list. Then when they are done I'll build and return (to the main form) the array with the files to be added to the email.
What object can I use to create a selectable image? I know Picturebox is not selectable at all.
Loading
ThomasPosted Mar 26, 2012, 3:59 PM
I was able to get the button trick to work for adding the icon but now I'm trying to find a way to select it so that it can be deleted. I've tried setting the focus and selecting the control.
If I hit the tab button first THEN I can select it manually but any time I try to select it dynamically when it is added, It does not stay selected.
Any suggestions?
ThomasPosted Mar 26, 2012, 1:51 PM