TListView is not correctly updating Canvas
Original Reporter info from Mantis: fleshmang
-
Reporter name: geno fleshman
Original Reporter info from Mantis: fleshmang
- Reporter name: geno fleshman
Description:
It seems that TListView is not updating the canvas correctly for certain operations, such as Canvas.Font.Style, Canvas.Font.Color, Canvas.TextOut, and Canvas.Draw (These are the only ones I have tested so far).
Additional information:
1. I am attempting to change the font color and style for individual lines in a TListView control on startup with OnAdvancedCustomDrawItem event. I have a message to write to statusbar to confirm method is firing as it should.
2. I added a TButton control to add 2 separate lines of text and 2 copies of an icon image to the TListView control.
- the first image and text were given the coordinates to draw into the visible viewing area of TListView; I ensured the text string was long to overhang the right edge.
- the second image and text were given the coordinates for the lower portion of the TListView, out of the visible viewing area.
In the first case, the image and text are invisible, except for the last few words which can be seen on the right of the TListView as though placed under it.
For the second case, the image and text are displayed next to the TButton, as though I had placed them on the main form.
I verified the expected results by using this code on Lazarus installed on a Windows XP VM, (some caveats which may need another bug report)
I have also included a debug output file - note at line 193 there is an error for each item loaded into the TListView [(treeviewtest:11907): Gtk-CRITICAL **: IA__gtk_tree_view_set_cursor_on_cell: assertion `path != NULL' failed ]; This was not seen in the Windows version.
This is my first report, btw, so take it easy on me &LtPos;grin>
Mantis conversion info:
- Mantis ID: 19816
- Version: 0.9.30