trichview.com

trichview.support




Re: Mouse click is bypassing font settings


Return to index


Author

Message

Sergey Tkachenko

Posted: 02/22/2002 19:18:30


This is a known problem.

Text style cannot be applied to the empty selection.

When user clicks the component, current text style is reset to the style in

the position of caret.

This is a consistent behavior in all cases, with exception of empty lines.

Will be fixed in one of the next updates.


Workaround: add an empty text string with desired font just after clearing:


   rve.Clear;

   rve.AddNL('',STYLENO,PARANO);

   rve.Format;

   rve.CurParaStyleNo := PARANO;

   rve.CurTextStyleNo := STYLENO;



> I'm using TRichViewEdit in a chat program.  When the user presses enter I

> send the text, clear the rich view edit and they start typing again.

>

> The problem I am having is that I create a style using a font type the

user

> selects and apply it and it works fine.  Typed text uses that style.  When

> they press enter the text is cleared and they can type more still using

that

> style.

>

> But if the control is empty and they click off the rich edit and back on

> it, the control defaults to what appears to be an no-style.  A base font.

>  After they press enter again everything is back the way it was using the

> selected font.  And its also fine if they type something and then click

off

> and back on.  It only happens when they click on the control when it is

empty.

>

> Anyone know the reason for this?







Powered by ABC Amber Outlook Express Converter