Page 1 of 1

[TRichView bug?] Problem with white font and AddPicture

Posted: Sat Jun 24, 2006 6:11 pm
by Jacek Puczynski
Hello. I foud some problems with inserting some text AFTER i call AddPictureEx, AddHotPicture or other method.

Code: Select all

RichView->AddPictureEx(img, insertimg, -1, rvvaBaseline);
This problem affects only TRichView working at systems Windows 98 and Windows ME. At Windows XP TRichView works fine.

Problem description: When I insert some colored text in TRichView before Picture (TGIFImage) then text is in color from ParaStyle but when I insert text AFTER picture then text always change color to white (in ParaStyle is other color for this text).

Some screenshots from the same program working on Windows 98 and Windows XP:

Windows XP (text after image):
Image

Windows 98 (text after image):
Image

Windows XP (text before image):
Image

Windows 98 (text before image):
Image

More about this error: while I select some text and image on Windows 98, text in some cases is visible in right color:
Screens from Windows 98:
Image

Image

I will be thankful for any help with this.
Greetings, Jacek.

Posted: Sat Jun 24, 2006 8:23 pm
by Jacek Puczynski
I've noticed this problem affects only for some GIFs (i think : non animated and transparent)
this is GIF I use on screens:
http://img480.imageshack.us/img480/7353/haha9xj.gif

Posted: Sun Jun 25, 2006 12:22 am
by Jacek Puczynski
More if I call:

Code: Select all

GifImage->DrawOptions >> goTransparent;
before i insert it to TRichView it non transparment but font has right color.

Posted: Tue Jun 27, 2006 6:41 pm
by Sergey Tkachenko
Does this problem persist if you include RVGifAnimate.pas in the project, and change RV->AnimationMode to rvaniOnFormat?

Posted: Tue Jun 27, 2006 8:55 pm
by Jacek Puczynski
Sergey Tkachenko wrote:Does this problem persist if you include RVGifAnimate.pas in the project, and change RV->AnimationMode to rvaniOnFormat?
Yes, it is. Screens are from program which has added RVGifAnimate.pas to project and AnimationMode sets to rvaniOnFormat.

Greetings, Jacek.

Posted: Wed Jun 28, 2006 7:55 pm
by Sergey Tkachenko
Please send me this document saved as RVF file.

Posted: Fri Jun 30, 2006 1:10 am
by Jacek Puczynski

Posted: Fri Jul 07, 2006 7:09 am
by Jacek Puczynski
Some news about this bug? :?

Posted: Sat Jul 08, 2006 7:58 am
by Sergey Tkachenko
Please send this file me by e-mail ( [email protected] ).
Rapidshare is almost useless for me, because I have a common external IP with many users of my local network, so Rapidshare usually says me that my download limit is exceeded.

Posted: Sat Jul 08, 2006 3:03 pm
by Jacek Puczynski

Posted: Tue Jul 11, 2006 5:49 pm
by Sergey Tkachenko
Confirmed.
Fix: in RVItem.pas, add the following lines

Code: Select all

      if not RVNT then
        Canvas.Refresh;
in TRVGraphicItemInfo.Paint, after the lines

Code: Select all

      if DCState<>0 then
        RestoreDC(Canvas.Handle, DCState);