CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Question line & column count in rtf box

    Hello !!
    I want an API function which will count LINE and COLUMN in a rich text box.
    Pls help me !!

    Thanks alot !!
    MMH

  2. #2
    Join Date
    Mar 2005
    Location
    Missouri
    Posts
    111

    Re: line & column count in rtf box

    Just a question; Do you want to count the amout of times the words "Line" and "Column" apear, or do you want to count the amount of lines and columns? Because, as far as I know, Text Boxes don't have columns. (But its very possible I'm wrong)

  3. #3
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569

    Re: line & column count in rtf box

    for lines use the :
    richtextbox.GetLineFromChar
    method.
    Mike

  4. #4
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Smile Re: line & column count in rtf box

    Hello !!!

    Well there's an API function call which counts the line and column in the RTF box....

    I want to keep track of the 'text cursor' in rtf box..

    eg: if the cursor is on the 3rd line at 10th column position,
    it should display as follows.

    Line : 3 Column : 10

    then, if position of cursor changes to 7th line with 2nd column
    it should display as follows.

    Line : 7 Column : 2

    the code is placed under selchange property of Rtf Box...
    So plz send me the code.... I will be thankful..

    Regards.
    MMH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured