Version

Set the Panel Style to CharacterPosition

The WinStatusBar™ CharacterPostion style is a type of panel that will display the current line and character position of a control.

Setting up CharacterPosition 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 CharacterPosition.

  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 CharacterPosition panel added to the status bar.

shows ultrastatusbar with characterposition style panel setup at design time

Setting up CharacterPosition Style Panel at Run-Time

In Visual Basic:

Imports Infragistics.Win.UltraWinStatusBar
...
Private Sub Set_the_Panel_Style_to_CharacterPosition_Load( _
  ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyBase.Load
	' Create an instance of RichTextBox
	Dim myRichTextBox As New RichTextBox
	Me.Controls.Add(myRichTextBox)
	' Create new panel
	Dim myPanel As New UltraStatusPanel()
	' Set the style for the panel
	myPanel.Style = PanelStyle.CharacterPosition
	' Set the default text
	myPanel.Text = "CharacterPosition"
	' 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 = myRichTextBox
End Sub

In C#:

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