I have an question about TRichViewEdit
I have an question about TRichViewEdit
Can I draw circles, ellipses, lines or arrows in RichViewEdit?
I mean like in Word or Paint.
Can you help me please?
I mean like in Word or Paint.
Can you help me please?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I have an project were in RichViewEdit I need to insert another RichViewEdit and write something in it. It's ok, it works, but when I save file the text writed in inserted control(RichViewEdit) don't save.What can I do to save text? Or can I save text from inserted controls?
And another question..
If I want to save file without text, only controls inserted how can I do that?
10x.
And another question..
If I want to save file without text, only controls inserted how can I do that?
10x.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1) In order to load RVF file containing controls, you need to register them with RegisterClasses. For example, if you use TButton and TEdit in document, call:
RegisterClasses([TButton, TEdit]);
Do it one time before the first loading.
2) Sorry, I do not understand the second question. Do you want to remove all text from document?
RegisterClasses([TButton, TEdit]);
Do it one time before the first loading.
2) Sorry, I do not understand the second question. Do you want to remove all text from document?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This procedure deletes all text items from document:
Call:
RVNormalize is unit from RichViewActions (it can be used even if you do not use RichViewActions)
Code: Select all
uses CRVData, RVTable, RVNormalize;
procedure DeleteText(RVData: TCustomRVData);
var i,r,c: Integer;
table: TRVTableItemInfo;
begin
for i := RVData.ItemCount-1 downto 0 do
if (RVData.GetItemStyle(i)>=0) or (RVData.GetItemStyle(i)=rvsTab) then // text or tabulation
RVData.DeleteItem(i)
else if RVData.GetItemStyle(i)=rvsTable then begin
table := TRVTableItemInfo(RVData.GetItem(i));
for r := 0 to table.RowCount-1 do
for c := 0 to table.ColCount-1 do
if table.Cells[r,c]<>nil then
DeleteText(table.Cells[r,c].GetRVData);
end;
end;
Code: Select all
RichViewEdit1.ClearUndo;
DeleteText(RichViewEdit1.RVData);
NormalizeRichView(RichViewEdit1.RVData);
RichViewEdit1.Format;
Thankyou very much for helping me..
It worked, but I have a little problem, I don't know how to save coordinates of inserted controls to remain where I introduced them, when deleting text the controls moves at the begin of line and I want to remain where I introduced them.
Have you an idea what can I do?
10x
It worked, but I have a little problem, I don't know how to save coordinates of inserted controls to remain where I introduced them, when deleting text the controls moves at the begin of line and I want to remain where I introduced them.
Have you an idea what can I do?
10x
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I want to create a mask for create pages for printing, and save that page without text so that next time I want to create an page to insert the mask and write text into control.
I use inserted RichViewEdit to write text near an image introduced(to have near image more lines )
Like in next pothos:
Here is when I create the page..
Here is how i want to look after saveing.
Have you understand what I want to do?
I use inserted RichViewEdit to write text near an image introduced(to have near image more lines )
Like in next pothos:
Here is when I create the page..
Here is how i want to look after saveing.
Have you understand what I want to do?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hi.. thanks for your help
I have another question..
I introduced an RichViewEdit into another RichViewEdit and save the file with extension rvf, but when I load into aplication the text writed inti the inserted RichViewEdit isn't loaded.. I think that wasn't saved.
What can I do to save text in inserted RichViewEdit?
I registered class in constructor whit function RegisterClasses..
Thank you..
I have another question..
I introduced an RichViewEdit into another RichViewEdit and save the file with extension rvf, but when I load into aplication the text writed inti the inserted RichViewEdit isn't loaded.. I think that wasn't saved.
What can I do to save text in inserted RichViewEdit?
I registered class in constructor whit function RegisterClasses..
Thank you..
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It's not so simple to insert RichViewEdit in RichViewEdit, because:
- it has link to TRVStyle, and links are not saved in RVF;
- it does not save its document together with its properties.
This demo shows how to solve these problems: http://www.trichview.com/forums/viewtopic.php?t=2199
- it has link to TRVStyle, and links are not saved in RVF;
- it does not save its document together with its properties.
This demo shows how to solve these problems: http://www.trichview.com/forums/viewtopic.php?t=2199