Status Strip - RTF Location RRS feed

  • Question


    Hi All,


    Would like to know, what is the code for status strip text location.

    I am developing an advanced notepad for some customizing text etc. and cannot find code or examples anywhere of how to put a text label in the status strip for the text "Column" & "Row" location.


    Its basically the same as the windows notepad feature.


    Can anyone please help me with this.


    Thank You.

    Friday, March 10, 2006 12:15 PM


  • Dim Ln As Integer = Me.RichTextBox1.GetLineFromCharIndex(Me.RichTextBox1.SelectionStart)

    Dim Cn As Integer = (Me.RichTextBox1.SelectionStart) - (Me.RichTextBox1.GetFirstCharIndexFromLine(Ln))

    Dim MyString As String = "Line: " & Ln.ToString & " Col: " & Cn.ToString

    Me.ToolStripStatusLabel1.Text = (MyString)

    Friday, March 10, 2006 2:07 PM