Problem with variables
Problem with variables
Sergey Tkachenko Hi!
My name is Vinicius and I'm working at the company Ceprotec. Recently who was talking to you was William, now on I will.
Well, I'm having a problem in RichView because I use variables that are locked into the text without being able to change them, for example, without permission to enter space. As is recorded in a database it stores everything in text form and returns the data when the variables also return in the form of text and no longer blocked. How do I return the data when the variables back in text form?
example, the variable {name} is inserted without modification and returns when you can change it.
I'm waiting. If you want you can reply by email: desenvolvimento.ceprotec @ gmail.com
Even more. Hug.
My name is Vinicius and I'm working at the company Ceprotec. Recently who was talking to you was William, now on I will.
Well, I'm having a problem in RichView because I use variables that are locked into the text without being able to change them, for example, without permission to enter space. As is recorded in a database it stores everything in text form and returns the data when the variables also return in the form of text and no longer blocked. How do I return the data when the variables back in text form?
example, the variable {name} is inserted without modification and returns when you can change it.
I'm waiting. If you want you can reply by email: desenvolvimento.ceprotec @ gmail.com
Even more. Hug.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hi!
That's right I need, when it loads the text in TRichView, fields that are variable and not need sheltered back in plain text.
To enter variables I use:
SRichViewEdit1.RichViewEdit.CurTextStyleNo: = 6;
SRichViewEdit1.RichViewEdit.InsertText ('{name}', False);
SRichViewEdit1.RichViewEdit.SetFocus;
So he enters the protected variable alterations, but when it reloads it comes in plain text. How would I go for when it loads, the text name} {return protected, would have to use another command instead of InsertText?
That's right I need, when it loads the text in TRichView, fields that are variable and not need sheltered back in plain text.
To enter variables I use:
SRichViewEdit1.RichViewEdit.CurTextStyleNo: = 6;
SRichViewEdit1.RichViewEdit.InsertText ('{name}', False);
SRichViewEdit1.RichViewEdit.SetFocus;
So he enters the protected variable alterations, but when it reloads it comes in plain text. How would I go for when it loads, the text name} {return protected, would have to use another command instead of InsertText?
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Ok, this is a field format. But what's is the format of document itself?
If you use TDBRichViewEdit, what's the value of FieldFormat property?
Why I ask.
If you save document in RVF format, all protection must be saved and loaded, unless there is some property settings preventing a correct work with styles. In this case, we need to change some properties to fix it.
If you save document in RTF format, all formatting must be stored, but protection is lost. In this case, we can write a procedure that will search for all fields inside {} and apply a protected style to them.
If you save document in a plain text format, all formatting, tables, images, protection are lost. We can create the same procedure as for RTF, but the simplest way is to implement a custom loading procedure that will search for fields before adding text to TRichView.
If you use TDBRichViewEdit, what's the value of FieldFormat property?
Why I ask.
If you save document in RVF format, all protection must be saved and loaded, unless there is some property settings preventing a correct work with styles. In this case, we need to change some properties to fix it.
If you save document in RTF format, all formatting must be stored, but protection is lost. In this case, we can write a procedure that will search for all fields inside {} and apply a protected style to them.
If you save document in a plain text format, all formatting, tables, images, protection are lost. We can create the same procedure as for RTF, but the simplest way is to implement a custom loading procedure that will search for fields before adding text to TRichView.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I changed to SaveRTFToStream SaveRVFToStream and really worked, but if I select only a few characters into the variable and put in bold or italics, etc. .. it loses the variable. Its to do that when we click on the variable on top of it to select it all, oh this problem would be resolved.
Thanks in advance.
Thanks in advance.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Which protection options did you include in the style for variables (6th)?
It is possible to protect variables from changing their text style.
For example, if you include rvprStyleSplitProtect, text style will be changed for the whole variable.
rvprModifyProtect must protect it from changing text style for a part of variable (because it means modification).
rvprStyleProtect must protect from any change of text styles (if you implement OnStyleConversion yourself, you need to check this option manually)
It is possible to protect variables from changing their text style.
For example, if you include rvprStyleSplitProtect, text style will be changed for the whole variable.
rvprModifyProtect must protect it from changing text style for a part of variable (because it means modification).
rvprStyleProtect must protect from any change of text styles (if you implement OnStyleConversion yourself, you need to check this option manually)
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TRichView/ScaleRichView does not support free positioning of objects. Objects can be either inserted in line like a character, or aligned to the left/right side. Because of this, text boxes are not supported (if you tell about "text box" as a text inside a frame that can be positioned at the specified coordinates).
Shapes (square, circle, etc.) are not supported too. You can either insert them as an image (metafile), or insert TSRVPaintBox where you can draw a shape yourself.
Shapes (square, circle, etc.) are not supported too. You can either insert them as an image (metafile), or insert TSRVPaintBox where you can draw a shape yourself.
Hello,
TDBRichViewEdit with saving as RTF in the Database (because of RTF2HTML-converting later) and i must insert and protect parts of text in the TDBRichViewEdit (javascripts from a generator)
Greetings
Björn
did you ever wrote that procedure? ... because i have the same problemSergey Tkachenko wrote: But if using RTF is important, I can create a procedure for applying protection to text inside {}.
TDBRichViewEdit with saving as RTF in the Database (because of RTF2HTML-converting later) and i must insert and protect parts of text in the TDBRichViewEdit (javascripts from a generator)
Greetings
Björn