Getting Started with WinForms CheckedListBox
You can add RadCheckedListBox either at design time or at run time:
Design Time
- To add a RadCheckedListBox to your form, drag a RadCheckedListBox from the toolbox onto the surface of the form designer.
- In the Properties section in Visual Studio open the Items property.
- Add several items by clicking the
Add
button. - Click
F5
to start the application.
Run Time
To programmatically add a RadCheckedListBox to a form, create a new instance of a RadCheckedListBox, and add it to the form Controls collection.
Adding a RadCheckedListBox at runtime
The bellow example demonstrates the main capabilities of RadCheckedListBox.
1. Drop a RadSplitContainer on your form and set its Dock property to Fill .
2. Add two panels to the split container. For example by using the smart tag.
3. Add RadLabel, RadCheckedListBox and a RadButton to each of the panels. At this point the form should look like this:
4. Now you are ready to bind the control. Open the code behind and add the following:
5. The example uses the following sample business object:
6. Now you can create a collection of PhonebookEntry business objects:
7. The next step is to create click event handlers for the buttons:
8. The final step is to use the VisualItemFormatting event to style the items in the first RadCheckedListBox. Please note that the checkbox position is changed.
Telerik UI for WinForms Learning Resources
- Telerik UI for WinForms CheckedListBox Component
- Getting Started with Telerik UI for WinForms Components
- Telerik UI for WinForms Setup
- Telerik UI for WinForms Application Modernization
- Telerik UI for WinForms Visual Studio Templates
- Deploy Telerik UI for WinForms Applications
- Telerik UI for WinForms Virtual Classroom(Training Courses for Registered Users)
- Telerik UI for WinForms License Agreement)