Version

Set the Panel Style to CursorPosition

The WinStatusBar™ CursorPostion style is a type of panel that will display the current X and Y position within the control designated by the panel’s Control property.

Setting up CusrosorPosition Style Panel at Design-Time

  1. Add an UltraStatusBar to your Windows Form.

  2. In the Property Pages scroll down to the Panels Property. Click the ellipsis to bring up the Panels Collection.

  3. Click the "Add" button. This will add a new panel.

  4. Scroll the properties until you come to the Style property. Set the Style property equal to CursorPosition.

  5. Set the Control property equal to the control that should be reflected by this panel. Any valid instantiated control will be displayed within this drop-down list.

  6. Click OK to close the window and you will see your CursorPosition panel added to the status bar.

Setting up CusrosorPosition Style Panel at Run-Time

In Visual Basic:

Imports Infragistics.Win.UltraWinStatusBar
...
Private Sub Set_the_Panel_Style_to_CursorPosition_Load( _
  ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyBase.Load
	' Create an instance of a TextBox
	Dim myTextBox As New TextBox
	Me.Controls.Add(myTextBox)
	' Create new panel
	Dim myPanel As New UltraStatusPanel()
	' Set the style for the panel
	myPanel.Style = PanelStyle.CursorPosition
	' Set the default text
	myPanel.Text = "CursorPosition"
	' Add the panel to the element
	Me.UltraStatusBar1.Panels.Add(myPanel)
	' Designate the control whose character position will be reflected
	Me.UltraStatusBar1.Panels(0).Control = myTextBox
End Sub

In C#:

using Infragistics.Win.UltraWinStatusBar;
...
private void Set_the_Panel_Style_to_CursorPosition_Load(object sender, EventArgs e)
{
	// Create an instance of a TextBox
	TextBox myTextBox = new TextBox();
	this.Controls.Add(myTextBox);
	// Create new panel
	UltraStatusPanel myPanel = new UltraStatusPanel();
	// Set the style for the panel
	myPanel.Style = PanelStyle.CursorPosition;
	// Set the default text
	myPanel.Text = "CursorPosition";
	// Add the panel to the element
	myPanel.Text="CursorPosition";
	ultraStatusBar1.Panels.Add(myPanel);
	// Designate the control whose character position will be reflected
	this.ultraStatusBar1.Panels[0].Control = myTextBox;
}
shows ultrastatusbar with a cursorposition panel style setup at run time