Hello,
I selected an image for background and I inserted into my TDBSRichViewEdit.
The image is inserted and displayed ok, but my editor doesn't save into my table.
this is my code:
With Editor.RichViewEdit do begin
Table.Edit;
BackgroundBitmap := FTMNBackGroundIMG.rv.BackgroundBitmap;
BackgroundStyle := FTMNBackGroundIMG.rv.BackgroundStyle;
color := FTMNBackGroundIMG.rv.Color;
Table.Post
end;
Thanks
How to save background in my field?
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Assigning values to the background properties is not an editing operation, so you need to follow the code pattern from http://www.trichview.com/help/idh_examp ... edit1.html :
(Editor.RichViewEdit.CanChange may be replaced to Table.Edit, but you forgot to call Editor.RichViewEdit.Change)
Code: Select all
if Editor.RichViewEdit.CanChange then
With Editor.RichViewEdit do begin
BackgroundBitmap := FTMNBackGroundIMG.rv.BackgroundBitmap;
BackgroundStyle := FTMNBackGroundIMG.rv.BackgroundStyle;
color := FTMNBackGroundIMG.rv.Color;
Change;
Table.Post
end;