Page 1 of 1

BUG! Funny focus rect bug for styleNo 4 and 5

Posted: Mon Jul 15, 2013 5:16 am
by Ja5
Test on RichView

just execute this code, then move mouse on items

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin

   RVStyle1.TextStyles.Clear;

   RVStyle1.TextStyles.Add;
   RVStyle1.TextStyles.Add;
   RVStyle1.TextStyles.Add;
   RVStyle1.TextStyles.Add;
   RVStyle1.TextStyles.Add;
   RVStyle1.TextStyles.Add;
   RVStyle1.TextStyles.Add;

   {  Or Assign
   RVStyle1.TextStyles.Add.Assign( RVStyle1.TextStyles[0] );
   RVStyle1.TextStyles.Add.Assign( RVStyle1.TextStyles[0] );
   RVStyle1.TextStyles.Add.Assign( RVStyle1.TextStyles[0] );
   RVStyle1.TextStyles.Add.Assign( RVStyle1.TextStyles[0] );
   RVStyle1.TextStyles.Add.Assign( RVStyle1.TextStyles[0] ); }

   RVStyle1.SaveINI(  ExtractFilePath(Application.ExeName) +   'test.ini', 'dem');
   RVStyle1.LoadINI(  ExtractFilePath(Application.ExeName) +   'test.ini', 'dem' );

   RichView1.AddNL('Style No 3 is Ok :) ', 3, 0);
   RichView1.AddNL('Style No 4 Focus rect BUG :( ', 4, 0);
   RichView1.AddNL('Style No 5 Focus rect BUG  :( ', 5, 0);

   RichView1.Format;
end;

Any idea on how to fix this :) except creation of fake TextStyles ?

Posted: Tue Jul 23, 2013 10:03 am
by Sergey Tkachenko
This is a bug: Jump property is not saved in INI. For backward compatibility reasons, if this property is not found in ini, the 4-th and the 5-th text styles are loaded as hypertext text styles.
It will be fixed in the next update, Jump property will be saved.

Posted: Tue Jul 30, 2013 2:45 pm
by Sergey Tkachenko
Fixed in TRichView 14.7 (available for registered users)