trichview.com

trichview.support




rv.AddLineBreak ?


Return to index


Author

Message

Mats Larsson

Posted: 04/09/2003 12:27:05


Hi there.


I'm trying to add a LineBreak into a Paragraph when in editing.

(RichViewEdit)


I don't want the addition of another paragraph when the user hits the

Enter-key, instead I want to simulate the Shift-Enter. But I still want the

user to be able to hit the Enter key to start typing on a new line, but in

the same paragraph. ( I don't want to bother the user with the use of that

shift key)

I have tried the following, in On keyDown;

         case Key of

               ...

               ...

              VK_RETURN:

                   begin

                   Key := 0;

                   myitem := rv.CurItemNo; // used to restore cursor pos.

                   rv.SetAddParagraphMode(False);

                   rv.AddNLTag('',somestyleID,someparagraphID,myTag);

                   rv.SetAddParagraphMode(True);

                   rv.Format;

                   ... some code

                   end;

              ....



But I have problems restoring the cursor possition, etc..

Can this be done? Can I send A win_message faking the Shift-Enter key?


Hope I'm not to confusing.


Many thanks in advance-








Powered by ABC Amber Outlook Express Converter