trichview.com

trichview.support




Re: VERY Important Questions !!


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/18/2002 19:55:20


> 1) I had to extend OnUrlNeeded-Event (and the GetURL-Function) for an

> additonal Paramater, called "ExtraCode":


Yes, I plan to improve OnURLNeeded event (probably completely remove it and

make a new event - OnWriteHyperlink).

But I think I hit the limit on incompatibilities for one version, so I'll

make changes only after the next release.

I do not think that there will be too many updates before the release (I

plan two).


>

> 2) I use a special Text-Style with its own background to save HTML-Code

> as Html-Code, so I have set "rvteoHTMLCode" in Options.


Do the <span>s and <p>s really hurt your code?

Can you give an example?



> 3) How to save controls when saving RVF to Stream? I use these two


Your code for loading and saving strings are correct.

Controls should be saved automatically, without raising events.

Did you register their classes with RegisterClasses?



>

> 4) How can I select the whole TextStyle?

> I mean, I have some lines with the same TextStyle, If User clicks on

> this part, I want to select it completly. How to do thaT? I know

> SetSelBounds and GetOffs...() but don't know what to do here..?


This code extends selection to the complete item(s):


var StartNo, EndNo: Integer;

  StartOffs, EndOffs: Integer;

  rve: TCustomRichViewEdit;


rve := RichViewEdit1.TopLevelEditor;

rve.RVData.GetSelectionBoundsEx(StartNo, StartOffs, EndNo, EndOffs, True);

if (StartNo<>EndNo) or (StartOffs<>EndOffs) then begin

  if StartOffs>=rve.GetOffsAfterItem(StartNo) then

    inc(StartNo);

  if EndOffs<=rve.GetOffsBeforeItem(EndNo) then

   dec(EndNo);

end;

StartOffs := rve.GetOffsBeforeItem(StartNo);

EndOffs := rve.GetOffsAfterItem(EndNo);

rve.SetSelectionBoundsEx(StartNo, StartOffs, EndNo, EndOffs);

rve.Invalidate;


I hope this is what you want.

This example has a disadvantage: it always selects text from top to bottom,

even if the original selection was from bottom to top.


>

> BTw.: Thanks for a _fast_ reply to this question, may I send u a free

> copy of my Help-Editor when its ready for your _genial_ support?


Yes, thanks


>

> Alex

>





Powered by ABC Amber Outlook Express Converter