BUG! Funny focus rect bug for styleNo 4 and 5

General TRichView support forum. Please post your questions here
Post Reply
Ja5
Posts: 8
Joined: Fri Jul 12, 2013 4:48 am

BUG! Funny focus rect bug for styleNo 4 and 5

Post 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 ?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Fixed in TRichView 14.7 (available for registered users)
Post Reply