ContextMenuStrip를 사용하여  ContextMenuStrip 팝업 메뉴 만들기 입니다.

 

팝업 메뉴에 추가, 수정, 삭제가 있습니다.

 

private ContextMenuStrip GetContextMenuStrip()
{
	ContextMenuStrip contextMenuStrip = new ContextMenuStrip();

	ToolStripMenuItem addItem    = new ToolStripMenuItem("추가");
	ToolStripMenuItem updateItem = new ToolStripMenuItem("수정");
	ToolStripMenuItem deleteItem = new ToolStripMenuItem("삭제");

	contextMenuStrip.Items.AddRange(new ToolStripItem[]
	{
		addItem,
		updateItem,
		deleteItem
	});

	addItem.Click	 += addItem_Click;
	updateItem.Click += updateItem_Click;
	deleteItem.Click += deleteItem_Click;

	return contextMenuStrip;

}

 

 

+ Recent posts