リンクラベルを使用して添付ファイルを識別する「リスト」を作成しようとしています(メールクライアントで)。だから、私はリンクを作成するためにこれを持っています:
Label newLabel = new LinkLabel();
newLabel.Name = "anexo" + Convert.ToString(anexos_file.Count); //anexos_file is a list where all the attachments Paths exist
newLabel.Text = Path.GetFileName(file);
newLabel.Left = bt_anexos.Left;
newLabel.Top = label2.Top;
newLabel.Width = 150;
newLabel.AutoSize = true;
newLabel.Click += new System.EventHandler(Click_anexo); //Click_anexo is the name of the function
次に、リンクをクリックするとリンク自体を削除する関数を作成する方法を知る必要があります。
それで、何か助けはありますか?