PDA

Click to See Complete Forum and Search --> : hidden treasure in Richtextbox...


tppradeep18
Jul 14th, 2000, 01:04 AM
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.

Cerksees
Jul 16th, 2000, 01:31 AM
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.

tppradeep18
Jul 17th, 2000, 05:03 AM
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...