.NET 및 Windows Forms 사용 :C# : MenuItem 전체 ContextMenu 하위 메뉴로 추가하는 방법
MenuItem
에 전체 ContextMenu
을 추가하는 가장 일반적인 방법은 무엇입니까?
의미 :
private void AddSubMenu(MenuItem item, ContextMenu menu)
{
// I want to add the full menu to the menu item as a submenu
// I could iterate the items of the menu and add them to the item
// but I guess that there is a smarter way to do this
}
미리 감사드립니다.
그것을 하위 메뉴로 추가하는 대신 메뉴에 컨텍스트 메뉴를 추가한다고 생각하십시오. –
아니요, 모든 'ContextMenu' 항목을'MenuItem' 아래에 추가합니다. 나는 그것을 시험했다. – digEmAll
완벽하게 작동합니다. 감사! –