Closed ChloeDigitalTechnologies closed 7 years ago
I do not remember details why I chose the OnPaint event, but this is demo-project. I don't insist on correct implementation. As will be time, I will check the variant offered by you, but now I will close the question.
Thank you! If there are ideas or improvements, do not hesitate to do Pull-Request or Issues
Of course I will 👍
In fact I am working for myself about a "small and simple" media center in order to display my video movie files with their Posters and Titles. See Screenshot with Modern Listview in action :)
The tracbar in the bottom left corner permits to resize the thumbnails. I faced up the issu, using the sample code in uForm3, that my pictures were not repainted when changing the size, I solved this by moving the OnPaint event code into the OnPainting, and fixing by calling repaint in ReloadLV (see Issue #9 )
Once finished, I can donate my code to your project (I'll fork your project at this moment), so that you'll be able to provide one more example for your nice Listview helper ;)
Cheers, Chloé
It's cool! If you donate a demo-project, I will post it
Thanks
Must use "OnPainting" event (TForm3.ListView1Painting) instead of OnPaint event (TForm3.ListView1Paint); It refreshes the painting of the bitmaps a lot better !
OnPainting is triggered before OnPaint. OnPainting signals that the control is about to be drawn, in case the rendering conditions need to be customized beforehand. OnPaint does the actual drawing.
Therefore, loading the bitmaps should be done before the on paint event, in order to be handled by the Listview.DoPaint method, or you are obliged to render them in onpaint with iBitmap.Render(Canvas,etc..)
Many thanks for this nice ModernListview you have created.