TCalendarLite - DoubleBuffered - Classic Theme: Doesn't work at all ?! lazarus / 31-LCL ---------------------------------------------------------------------- RAW · 2019-05-25 21:26 This morning I downloaded a component (TCalendarLite 0.3.4) and wanted to start playing around with it, but with a classic theme it's impossible because of too much flickering. W7 SP1 x64: DoubleBuffered:= True has no effect. XP  SP3 x86: DoubleBuffered:= True has no effect, but looks a bit better // not much though ... - Clicking on the Month/Year buttons is OK. - Using VK_PRIOR or VK_NEXT is OK too. Can anybody confirm this ... Anybody who uses a classic theme ? I did almost nothing ... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Procedure TwndGUI.FormCreate(Sender: TObject);Begin  DoubleBuffered:= True; // classic theme  BorderStyle   := bsNone;  Color         := clBlack;  SetBounds     ((Screen.WorkAreaWidth -1280) Div 2,                 (Screen.WorkAreaHeight- 768) Div 2,                 1280, 768);    CAL                         := TCalendarLite.Create(Self);  CAL.SetBounds               (0, 0, Width, Height);  CAL.DoubleBuffered          := True; // classic theme  CAL.StartingDayOfWeek       := dowMonday;  CAL.Colors.BackgroundColor  := clBlack;  CAL.Colors.SelectedDateColor:= RGBToColor(0, 80, 255);  CAL.Font.Size             := 20;  CAL.Font.Quality            := fqAntialiased;  CAL.Parent                  := Self;End; ---------------------------------------------------------------------- jamie · 2019-05-25 22:09 I don't know the component but you can try this.. CAL.Brush.Style := bsClear; That should take care of the WM_EREASEBK message.. Or I guess you could trap that message ! ---------------------------------------------------------------------- RAW · 2019-05-25 23:17 Thanks for the info ... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i CAL.Brush.Style := bsClear;This seems to have no effect ... QuoteOr I guess you could trap that message !Like this or directly inside that component? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i // Procedure WndProc (Var MSG: TMessage); Override; Procedure TwndGUI.WndProc(Var MSG: TMessage);Begin  If MSG.MSG = WM_ERASEBKGND  Then MSG.Result:= 1  Else Inherited WndProc(MSG);End; ---------------------------------------------------------------------- jamie · 2019-05-26 01:30 You can try it. Its also possible the control is doing it itself.. But the WM_EraseBk is a very common way to reduce the flicker.. ---------------------------------------------------------------------- wp · 2019-05-26 13:09 This will not work. The component uses too many background erasing steps internally. Please try the new version in ccr trunk which paints into a bitmap buffer first. In order to update your current installation I think it is enough to copy https://sourceforge.net/p/lazarus- ccr/svn/HEAD/tree/components/callite/source/calendarlite.pas over the existing file. ---------------------------------------------------------------------- RAW · 2019-05-26 19:32 @wp Thanks, I cannot see any flicker anymore! Yeah, the SVN button and DOWNLOAD SNAPSHOT button ... I should have known ...  // svn://svn.code.sf.net/p/lazarus-ccr/svn/components/callite/ This link didn't work for me, so I thought I use the 0.3.4 stable version ... This PC has no SVN software installed... Is it possible that FBUFFER isn't freed ? I get an Error about 11 unfreed Blocks, I'll take a look! Thanks again. Edit: Looks like this is missing Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i destructor TCalDrawer.Destroy;begin  FBuffer.Free;  inherited Destroy;end; ---------------------------------------------------------------------- wp · 2019-05-26 20:14 Sorry for insufficient testing... The new commit fixes the memory leak. The link to the download of calendarlite.pas is ok: after opening the link you see the sourcecode of this unit - when you click on "Download this file" you get the pas file directly, just copy it over the original one of the 0.3.4 stable release.