I have a problem with the text editors in Delphi XE2 when a VCL style is applied. If I have 2 TMemo controls (Memo1 and Memo2) placed on a form and Memo1 is partially behind Memo2, then the scollbars of Memo1 are painted over Memo2.
I tried to create a style hook inherited from TScrollingStyleHook, but I didn't find any way to fix the problem. Does anybody have an idea on how this bug could be fixed?
BTW: I tested it in Delphi XE5 too and it behaves in the same way.
Here is the source code for the .dfm and .pas files:
DFM:
object Form1: TForm1 Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 282 ClientWidth = 418 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Memo1: TMemo Left = 120 Top = 80 Width = 185 Height = 89 Lines.Strings = ( 'Memo1') ScrollBars = ssBoth TabOrder = 0 end object Memo2: TMemo Left = 160 Top = 128 Width = 185 Height = 89 Lines.Strings = ( 'Memo2') ScrollBars = ssBoth TabOrder = 1 end end PAS:
unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm1 = class(TForm) Memo1: TMemo; Memo2: TMemo; private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} end.