Version

EnsureGroupInView Method

Makes sure that the UltraExplorerBarGroup is in view.
Syntax
'Declaration
 
Public Sub EnsureGroupInView() 
public void EnsureGroupInView()
Remarks

For Styles ‘1 – Listbar’ and ‘2 – Toolbox’, brings the UltraExplorerBarGroup into view by setting the SelectedGroup to this UltraExplorerBarGroup.

For Style ‘0 – ExplorerBar’ brings the UltraExplorerBarGroup into view by scrolling the main area of the control if necessary.

If the group's Expanded property is set to true, the group's UltraExplorerBarItems are brought into view as well.

In cases where the group's height exceeds the height of the control, as much of the group is brought into view as is possible.

Example
The following code iterates though all groups looking for the first one with a Checkeditem and shows how to use the Group's EnsureGroupInView method to make sure that the Group is Visible.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar


	Private Sub Button33Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button33.Click

		' Find the first Group that has a checked Item and ensure that it is in view.
		Dim i As Integer

		For i = 0 To Me.ultraExplorerBar1.Groups.Count - 1
			If Not Me.ultraExplorerBar1.Groups(i).CheckedItem Is Nothing Then
				Me.ultraExplorerBar1.Groups(i).EnsureGroupInView()

				Exit For
			End If

		Next

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;


		private void button33_Click(object sender, System.EventArgs e)
		{
			// Find the first Group that has a checked Item and ensure that it is in view.
			for (int i = 0; i < this.ultraExplorerBar1.Groups.Count; i++)
			{
				if (this.ultraExplorerBar1.Groups[i].CheckedItem != null)
				{
					this.ultraExplorerBar1.Groups[i].EnsureGroupInView();

					break;
				}
			}
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also