From 4c409b841d08c1a51f1b6caed0445f3a8cfa4c1f Mon Sep 17 00:00:00 2001 From: bocchanskyy Date: Sun, 10 Nov 2024 16:43:20 +0400 Subject: [PATCH] fix for lab3 --- .../VisualComponents/CustomSelectedCheckedListBox.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VolkovLabs/WinFormsLibraryVolkov/VisualComponents/CustomSelectedCheckedListBox.cs b/VolkovLabs/WinFormsLibraryVolkov/VisualComponents/CustomSelectedCheckedListBox.cs index 9449a6c..693179a 100644 --- a/VolkovLabs/WinFormsLibraryVolkov/VisualComponents/CustomSelectedCheckedListBox.cs +++ b/VolkovLabs/WinFormsLibraryVolkov/VisualComponents/CustomSelectedCheckedListBox.cs @@ -63,7 +63,9 @@ namespace WinFormsLibraryVolkov { if (checkedListBox.Items.Contains(value)) { + int selectedIndex = checkedListBox.Items.IndexOf(value); checkedListBox.SelectedItem = value; + checkedListBox.SetItemChecked(selectedIndex, true); } } }