Results 1 to 3 of 3

Thread: hidden treasure in Richtextbox...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    New Delhi, India
    Posts
    75
    I have played a lot with Richtextbox. but there are some treasures to be explored and here is one of them. I have two lines of text in a richtext box and the third line contains a big bitamp picture. Fourth line is again a normal text which contains a word called "mytext". If I search the text for "Mytext" , i get the line number as 4. u say obviously but I would say not. If you look carefully the bitmap is taking the space of more than one line. in this case the line containing "Mytext" should be somewhere in line 10, 11 or whatever depending upon the no. of lines occupied by the bitmap. If Im wrong in what i conceptualize then is there any way to solve my problem the way anyone understands it.

  2. #2
    Junior Member
    Join Date
    Jul 2000
    Location
    Posts
    28

    Not quite...

    The reason for the correct line number sequence is that each line actually has a CR at its end, no matter the size of the font (picture).

    As for solving your "problem", I didn't see any problem to solve. Please post it, and I'll try to help.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    New Delhi, India
    Posts
    75

    Lightbulb

    I feel i could have given more example to the above question. I have created a custom scroll bar relies on the height of the right text box after it has be resized to show the entire content. The idea is to put this resized rich text box inside a picture box and then scroll it. But if the contents are going to be dynamic then ..
    a) how can i determine the scrollable area in RTB and resize accordingly.
    b) How do I change the top property of the rich textbox inside the picturebox in such a way that the searched word appears at the top of the picturebox.

    thax...

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