Category / Section
How to expand the GroupBarItem programatically in WinForms GroupBar?
1 min read
Expand Groupbar item
In GroupBar, it is possible to expand the GroupBaritem programmatically by using the property named “SelectedItem”.
Following Code snippet helps to achieve this requirement.
C#
//To Select the item in the groupbar this.gbVisualStudio.SelectedItem = this.listBox1.SelectedIndex;
VB
'To Select the item in the groupbar Me.gbVisualStudio.SelectedItem = Me.listBox1.SelectedIndex
Figure 1. Expand GroupBarItem in GroupBar with Image.
Figure 2. Expand GroupBarItem in GroupBar with Image.
Figure 3. Expand GroupBarItem in GroupBar with Image.
Samples: