I am in process of switching all TcxRichEdit to TScaleRichView or TRichView components and with TScaleRichView I have found issues that should be fixed somehow. The first is memory leak when users switches display layout, e.g. from Draft to Print/Web. Actually it is enough that user only opens the form with TScaleRichView on it and closes, then MadExcept returns memory leak errors with TBitmap.
The thing is that I am now working with the biggest and most important form when user can create medical reports in a form with TScaleRichView. I basically copied the components and quite some code from the demo that uses TScaleRichView and actions and then implemented some modifications, also using the demo with editor without actions (for Layout views). The base form for writing these documents has embedded form on which is the actual editor with TScaleRichView. I don't like to use frames so I used embedded form. When user just opens the base form and closes, then memory leak appears in MadExcept on TBitmap. Slight investigation to the code show that the problem is in unit SRVToolBar.DrawButton as imgTemp does not frees. Yes, I have TActionList, all the images for the HMenu and VMenu as well as images for toolbars (I use Dev express bar manager) are in TImageLIst but looks like imgTemp is not freed at the end of procedure SRVToolBar.DrawButton. At the moment I added the code
Code: Select all
if Assigned(imgtmp) then
imgtmp.Free;
The other issue is with painting. Switching between layouts produces black scrollbars as well as zoom panel, HMenu and VMenu. Just moving mouse over them shows the blackened components. I do not use skins in the software but I have changed the colours of components as we don't use clBtnFace but rather a bit bluish panels, buttons and so on. Unfortunatelly I can't trace the source of this problem and I do not have any idea how to resolve this. At least I can say it is annoying and if there is a solution for this I would be glad to use it.
Oh and speaking of the color, if one changes the properties
Code: Select all
TSRichViewEdit.BackgroundProperty.ColorBegin := clBtnFace
TSRichViewEdit.BackgroundProperty.Visible := False
Best regards,
Goran