방법: ToolStrip 컨트롤에서 설정/해제 단추 만들기
사용자가 토글 단추를 클릭하면 눌린 것으로 나타나고 사용자가 단추를 다시 클릭할 때까지 눌린 모양이 유지됩니다.
토글 ToolStripButton을 만들려면
다음 코드 예제와 같은 코드를 사용합니다. 이 코드는 양식에 ToolStrip 컨트롤이 포함되어 있고 해당 Items 컬렉션에
toolStripButton1
라는 ToolStripButton이 컨트롤이 포함되어 있다고 가정합니다. 또한toolStripButton1_CheckedChanged
라는 이벤트 처리기가 있다고 가정합니다.toolStripButton1.CheckOnClick = True toolStripButton1.CheckedChanged AddressOf _ EventHandler(toolStripButton1_CheckedChanged);
toolStripButton1.CheckOnClick = true; toolStripButton1.CheckedChanged += new _ EventHandler(toolStripButton1_CheckedChanged);
추가 정보
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET Desktop feedback