CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BCB1] RE: TRichEdit component and images
Hi Rob
Following on from the question about
At 11:29 98/03/05 -0500, you wrote:
> Sorry, there is no indication that v3 TRichEdit
> has any new capabilities. It fixes the old Paint
> problem, but I see no other changes.
Could you please explain what the old paint problem is ?
I am experiencing what seems like what you're describing.
I using the following code to (try to) display an image in a RichEdit control:
Graphics::TBitmap *tempGraphic = new Graphics::TBitmap;
TImage *img = new TImage(this);
/* // Method A
img->Parent = RichEdit1;
tempGraphic->LoadFromFile("flowers.bmp");
img->Canvas->Draw( 10, 10, tempGraphic );
*/
// Method B
img->Picture->LoadFromFile("flowers.bmp");
// optional image placement code, like img->Left = 10;
RichEdit1->InsertControl(img);
It seems that Method A and Method B achieve the same result (displays an
image in the control), but thereafter, some corruption occurs to the first
character of subsequently entered text. Also the image is not redrawn
successfully if the RichEdit control is scrolled. Is this the paint problem
you mentioned, or have I just screwed up my code.
Any help appreciated.
Michael.
W Komornicki's Home Page |
Main Index |
Thread Index