I want to make a list with links to certain folders appear based on choices made in two comboboxes. First idea that popped to mind was adding linklabels into a listbox but I cannot fathom how to actually make it work.
What I have so far:
private void button1_Click(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == 0 && comboBox2.SelectedIndex == 0)
{
LinkLabel label1 = new LinkLabel();
label1.LinkArea = new LinkArea(0, 22);
label1.Links.Add(24, 9, "E:\Folder");
label1.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkedLabelClicked);
listBox1.Items.Add(label1);
}
}
where
private void LinkedLabelClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("E:\Folder");
}