Trial Version
Trial Version
What is the restrictions in the TRichView's trialverion?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Trial Version
For TRichView - only a red label showing "unregistered" message.
For ScaleRichView - "unregisted" text in the editor window, printing only the first page, zoom in range 25-150%
For ScaleRichView - "unregisted" text in the editor window, printing only the first page, zoom in range 25-150%
Re: Trial Version
Hi,
You gave me an example of coding tekst in RichViewEdit with colors, superscript and more.
I have tried to transfer the example to my own program (after installation of the TRichView) but I get an error message pointing at the first occurance of GetTextStyle, with the text: "Not enough actual parameters". In your example I do not get this message, but here benath I am not able to compile the code because of the error????
function TForm1.GetTextStyle(Style: TFontStyles; Color: TColor;
SScript: TRVSubSuperScriptType): Integer;
var
TextStyle: TFontInfo;
begin
TextStyle := TFontInfo.Create(nil);
TextStyle.Assign(RVStyle1.TextStyles[0]);
TextStyle.Color := Color;
TextStyle.Style := Style;
TextStyle.SubSuperScriptType := SScript;
Result := RVStyle1.FindTextStyle(TextStyle);
TextStyle.Free;
end;
procedure TForm1.lbOrdbog2Click(Sender: TObject);
begin
RichViewEdit1.Clear;
RichViewEdit1.AddNL('This is ', 0, 0);
RichViewEdit1.Add('bold', GetTextStyle([fsBold])); (ERROR IN THIS LINE)
RichViewEdit1.Add(' and ', 0);
RichViewEdit1.Add('italic', GetTextStyle([fsItalic]));
RichViewEdit1.Add(' and ', 0);
RichViewEdit1.Add('underline', GetTextStyle([fsUnderline]));
RichViewEdit1.Add('. This is superscript', 0);
RichViewEdit1.Add('pl', GetTextStyle([], clWindowText, rvsssSuperScript));
RichViewEdit1.Add(' and more superscript', 0);
RichViewEdit1.Add('t', GetTextStyle([], clWindowText, rvsssSuperScript));
RichViewEdit1.AddNL('', 0, 0);
RichViewEdit1.AddNL('This is ', 0, 0);
RichViewEdit1.Add('green', GetTextStyle([], clGreen));
RichViewEdit1.Add(' and ', 0);
RichViewEdit1.Add('red', GetTextStyle([], clRed));
RichViewEdit1.Format;
end;
You gave me an example of coding tekst in RichViewEdit with colors, superscript and more.
I have tried to transfer the example to my own program (after installation of the TRichView) but I get an error message pointing at the first occurance of GetTextStyle, with the text: "Not enough actual parameters". In your example I do not get this message, but here benath I am not able to compile the code because of the error????
function TForm1.GetTextStyle(Style: TFontStyles; Color: TColor;
SScript: TRVSubSuperScriptType): Integer;
var
TextStyle: TFontInfo;
begin
TextStyle := TFontInfo.Create(nil);
TextStyle.Assign(RVStyle1.TextStyles[0]);
TextStyle.Color := Color;
TextStyle.Style := Style;
TextStyle.SubSuperScriptType := SScript;
Result := RVStyle1.FindTextStyle(TextStyle);
TextStyle.Free;
end;
procedure TForm1.lbOrdbog2Click(Sender: TObject);
begin
RichViewEdit1.Clear;
RichViewEdit1.AddNL('This is ', 0, 0);
RichViewEdit1.Add('bold', GetTextStyle([fsBold])); (ERROR IN THIS LINE)
RichViewEdit1.Add(' and ', 0);
RichViewEdit1.Add('italic', GetTextStyle([fsItalic]));
RichViewEdit1.Add(' and ', 0);
RichViewEdit1.Add('underline', GetTextStyle([fsUnderline]));
RichViewEdit1.Add('. This is superscript', 0);
RichViewEdit1.Add('pl', GetTextStyle([], clWindowText, rvsssSuperScript));
RichViewEdit1.Add(' and more superscript', 0);
RichViewEdit1.Add('t', GetTextStyle([], clWindowText, rvsssSuperScript));
RichViewEdit1.AddNL('', 0, 0);
RichViewEdit1.AddNL('This is ', 0, 0);
RichViewEdit1.Add('green', GetTextStyle([], clGreen));
RichViewEdit1.Add(' and ', 0);
RichViewEdit1.Add('red', GetTextStyle([], clRed));
RichViewEdit1.Format;
end;
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Trial Version
This method is defined in the interface section in the following way:
You can see all parameters have default values, so they can be omitted.
Code: Select all
function GetTextStyle(Style: TFontStyles = []; Color: TColor = clWindowText;
SScript: TRVSubSuperScriptType = rvsssNormal): Integer;
Re: Trial Version
Why do I then get an error if I try to compile the code?
The only difference between the code example you send me and my code is that I put the maincode in a listbox click event and yours is placed in the formcreate event.
BR Lars
The only difference between the code example you send me and my code is that I put the maincode in a listbox click event and yours is placed in the formcreate event.
BR Lars
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Trial Version
I think you copied code from my demo incompletely.
How is GetTextStyle defined in the interface section of your unit? Does it have default values specified, as it was in the original code?
How is GetTextStyle defined in the interface section of your unit? Does it have default values specified, as it was in the original code?
Re: Trial Version
Hi Sergey, you are right. I just copied the "head" of the function itself beleiving that there was no differences.
Thank you!
Thank you!