-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VT Header draws smudged (see screenshot) #248
Comments
From [email protected] on December 23, 2014 14:02:39 Is the problem still there in V5.5.1? |
From [email protected] on January 06, 2015 18:48:51 This fail draw occurs on 5.52 too. When you try to change column order, and mantains cursor in vertical header range the control draws a piece in selececter column color. any solution at this moment? |
From [email protected] on January 08, 2015 10:44:58 I'm sorry, no solution from me. I personally never worked in this part of the code so far. |
From [email protected] on January 08, 2015 16:23:02 Thanks any way, last thing, do you have any clue where can I start to find this bug?, or can you contact the person that work in this behavior. |
From [email protected] on January 09, 2015 04:02:38 Let me check if this is still the case - will get back to you ASAP. |
From [email protected] on January 14, 2015 17:09:41 Ok, I found a "more or less" solution. The solution is in TVTHeader.HandleHeaderMouseMove line 12572 in v5.52, you need to add an treview.update after invalidate, then process pending messages before call preparedrag and capture the blue button for background. Change this ----> if I > NoColumn then with this ----> if I > NoColumn then begin The problem with a lagging draw is not corrected, but that is another problem, slow folow the mouse cursor and a lor of blinking, and seems that text move into dragable button. Now beautiful to see. |
From [email protected] on January 15, 2015 09:40:55 This code (draw on drag, this is an incredible control anyway) seems to be very buggy. Another thing with simply solution is when you drag one column not show dragcursor, to solve this, insert Windows.SetCursor(Screen.Cursors[self.DragCursor]); in first line after begin in DoHeaderDragging method. |
At this moment this problem continues, do anyone know something more about this? |
Do you have simple repro steps for this issue with one of the sample projects? |
There are another problem with circled arrow icons that paint on the sides of header buttons, they are cropped, some times it's now drawed other ones remain drawed, buf. |
I can't seem to reproduce this problem on my Win 10 and Win 7. The screenshot above where the "Column3" is smudged--was it a VM being used? |
The problem was reproduced on windows 7 ultimate clean installation, not in VM (yes I test on a VM windows 8 and one VM windows XP (I know, XP...). And fail in all of them, persistent error. I compile it with delphi XE7 and XE3. Only pick column and move it from left to right and viceversa some times and problem arise. If you need that I make more test, please tellme. Upper capture was with unmodified demo app. Another one from a vcl styles app. |
Smudging was occuring because the partial header caption copied as a backup image by Dragimage object was a pressed caption whereas the rest of the caption was released during the drag to be drawn non-pressed, causing a misalignment.
Please test with the latest commit and confirm that the problem is solved. |
Smudging occured due to the way drag code is designed that restores a prior image of the header captured in its backup and causes the smudge. This also produces a distorted caption sometimes. The fix involves doing a repaint of the header rect in TVTHeader.DragTo if the function is not already doing a repaint of the specific column. This also fixed the earlier distorted caption problem and the separate fix for that problem committed earlier is not needed any more and is reversed in this source. However, some more testing is needed by the users who reported this to make sure that it works OK now.
I just committed a fix for this header smudge problem. Please test it and let me know whether it works better. Thanks. |
I download latest version today, and sorry, but worst. Blinking is higher and many times background is drawed over drag object. In the image the dragged object is under col 1 header. This behavior doesn't occur in previous version. I only can say thanks by this control and I hope you forgive me, but I think all this artifacts are all in one point, the code that draws the dragging object and restore background is buggy. Some comments above I talk about add an update aften an invalidate, I know, I update entire treview, so I am shooting a fly with a canon, but the problem goes better. I think thak mouse move events capture background before invalidate in mesage queue is procesed, so, background is corrupted. |
I can't see any difference in blinking from previous to this one. The blinking occurs only when the drag goes over a new column. That is same as before. Are you using a VM? I'm not using a VM.
Whatever I do, I can't recreate that problem. Can you give me steps to recreate the problem shown in the screenshot? Also tell whether you are using a VM. Thanks. |
Hello, no I'm using an q9550 with ati 6870, Windows 7 64bits, no vm. I tested today in other two pc with windows 7 and one more with windows 8, same problem in all of them. I only catch a column header and displace to the left over other columns. In deed i can only see that works well on windows XP but I read the code and in xp use other mechanism. Tomorrow I'm goint to prepare a windows 10 machine ( no vm) and test too, i'll send a capture |
OK. I got it now why I'm not seeing the same problems as you. All this time, I have been testing under Windows 10, assuming that it's same underneath as Windows 7, at least for win32 apps. In Windows 10, the fix works quite well and I can't duplicate that problem at all. But after your message, I just tested on an old Windows 7 laptop, and I can duplicate the problem of drag image going under immediately. So it seems, Microsoft seems to have done some work under the hood in Windows 10. It's different after all, even for Win32. Thanks. |
* The blue rectangles and delay no longer occurs * The partial dropmarks painting is fixed * Earlier fix is reverted and replaced with new fix The fix involved a change in the function UpdateWindowAndDragImage in order to allow its use for the dragimage object used in header.
Well, I have made some major changes to fix this issue. I tested this time on Windows 7 too. I no longer see the blue rectangles, delay and partial drop marks being painted. Please use the latest commit to test the fix and let me know if you still see any problems. Thanks. |
I'm closing this issue. If you happen to still find any related problem, please open it again. Thanks. |
I can’t test it, latest build is not installable on Delphi XE7. I open Issue #655 |
Sorry, #655 is fixed now. |
Sorry but El software de antivirus Avast ha analizado este correo electrónico en busca de virus. |
Thank you for testing. Can you explain what you mean by position icon is cutoff? If you mean the DropMark on the left, it was a bug. Dropmark should not appear if the column is not going to change position. See issue #643. Other than that, please give more details on what problem you see. Thanks. |
No, thanks to you, awesome work, Ok, In that capture I move the Column 3 between "column" and "Column1" if you look on top of "C" letter of Column 1 you can see a piece of the Dropmark. |
I see now. I saw the problem in painting C but didn't realize it was a drop On Thu, Sep 15, 2016 at 7:50 AM, RicardoBer [email protected]
|
…g a drag Smudging was occuring because the partial header caption copied as a backup image by Dragimage object was a pressed caption whereas the rest of the caption was released during the drag to be drawn non-pressed, causing a misalignment.
…g a drag Smudging occured due to the way drag code is designed that restores a prior image of the header captured in its backup and causes the smudge. This also produces a distorted caption sometimes. The fix involves doing a repaint of the header rect in TVTHeader.DragTo if the function is not already doing a repaint of the specific column. This also fixed the earlier distorted caption problem and the separate fix for that problem committed earlier is not needed any more and is reversed in this source. However, some more testing is needed by the users who reported this to make sure that it works OK now. # Conflicts: # CHANGES.txt
* The blue rectangles and delay no longer occurs * The partial dropmarks painting is fixed * Earlier fix is reverted and replaced with new fix The fix involved a change in the function UpdateWindowAndDragImage in order to allow its use for the dragimage object used in header. # Conflicts: # Source/VirtualTrees.pas
This issue seems to have a simple solution after hours of investigations.
This looks to be an enforcement of correct access sequence to ScreenDC inside the WinAPI. |
…of header buttons, they are cropped
Thanks, I added this line (without testing) to the master branch. |
From [email protected] on December 19, 2011 22:14:37
I recall VT's painting to be quite smooth when I used it in D7 (with Mike's releases). Now, the painting, when dragging a column, seems to be really lagging behind, and sometimes when you click on the column header and drag really quickly, you get a smudge (see screenshot). I disabled theme awareness; same problem (speaking of theme awareness, even when it was off, the XP mode was a really nice feature, now gone).
Attachment: vt2.png
Original issue: http://code.google.com/p/virtual-treeview/issues/detail?id=248
The text was updated successfully, but these errors were encountered: