mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 09:06:04 +02:00
* Merge winforms framework content to working branch (#14) * Breadcrumb / TOC / Move net5 to net folder (#15) * change path from net5 to net * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Add .net 5 winforms placeholder article (#16) * added some metadata and adjusted net5 placeholder * corrections * corrections * corrections * Test1 * Swapping landing page vs concept * fix links * Fix links * Fix desc
1.4 KiB
1.4 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | |||||
|---|---|---|---|---|---|---|---|---|---|
| How to: Create Toggle Buttons in ToolStrip Controls | 03/30/2017 |
|
|
d9c197df-4c65-43f2-beee-b68b52b2befc |
How to: Create Toggle Buttons in ToolStrip Controls
When a user clicks a toggle button, it appears sunken and retains the sunken appearance until the user clicks the button again.
To create a toggling ToolStripButton
-
Use code such as the following code example. This code assumes that your form contains a xref:System.Windows.Forms.ToolStrip control, and that its xref:System.Windows.Forms.ToolStrip.Items%2A collection contains a xref:System.Windows.Forms.ToolStripButton called
toolStripButton1. It also assumes that you have an event handler calledtoolStripButton1_CheckedChanged.toolStripButton1.CheckOnClick = True toolStripButton1.CheckedChanged AddressOf _ EventHandler(toolStripButton1_CheckedChanged);toolStripButton1.CheckOnClick = true; toolStripButton1.CheckedChanged += new _ EventHandler(toolStripButton1_CheckedChanged);