Page 1 of 1
Insert Gif in text
Posted: Tue Nov 08, 2005 1:24 pm
by BLeeD
Sorry, but I can't insert Gif animation between two words. I use RichView 1.9.8. Please help me with source
Posted: Tue Nov 08, 2005 4:38 pm
by Sergey Tkachenko
To insert when generating a new document, or to insert in the caret position?
Posted: Wed Nov 09, 2005 5:37 am
by Guest
I write a chat and I need to insert animated smile
I use code
procedure InsertSmile;
var
Gif: TGifImage;
begin
Gif := TGifImage.Create;
Gif.LoadFromFile('1.gif');
RivhView1.AddPictureEx('', Gif, 0 , rvvBaseLine);
end;
Smile is inserted and animated, but it to be transferred a next line with all other text
Posted: Wed Nov 09, 2005 8:59 pm
by Sergey Tkachenko
Use -1 instead of 0 to add to the same line.
Posted: Thu Nov 10, 2005 5:24 am
by BLeeD
All the same it is impossible, when I use a code
var
Gif: TGifImage;
begin
Gif: = TGifImage. Create;
Gif. LoadFromFile (' Data \Smiles \censored.gif ');
RichView1. Add (' SomeText ', 0);
RichView1. AddPictureEx (", Gif, 1, rvvaMiddle);
RichView1. Add (' Other Text ', 1);
RichView1. Format;
end;
The following turns out
----------------------------------------------
SomeText
(smile)OtherText
----------------------------------------------
Use 1 only centers a picture
Posted: Thu Nov 10, 2005 12:54 pm
by Sergey Tkachenko
No, not 1, but -1:
RichView1. AddPictureEx (", Gif, -1, rvvaMiddle);
If this value is positive, the image starts a new paragraph, and this value is an index in the collection RVStyle.ParaStyles defining the paragraph attributes.
If this value is -1, the image is added to the existing paragraph.
Posted: Fri Nov 11, 2005 4:13 am
by BLeeD
thanks, it really works!!!
It is really excellent support forum!!!