I have a WinForms C# project targeting .Net Framework 4.7.2 with a form which includes a group box. There is no Click event for this control visible from VS2022 when showing control properties via right-click and selecting events, despite MS documentation (https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.groupbox.click?view=netframework-4.7.2) indicating that it exists.
Click
is a member of theControl
class so all controls have that event. If it's not displayed in the Properties window for a particular control, it's because they don't think you should be handling that event for that control. Why are you? Why do you care about the user clicking aGroupBox
? It's not necessarily bad but it's unusual.[EditorBrowsable(EditorBrowsableState.Advanced)]
attribute. See stackoverflow.com/a/3708900/14171304groupBox1.Click += someeventcode;
e.g. before or afterInitializeComponent();