Skip to content
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

Distorted shape when dragging the columns #1254

Closed
Issamdnn opened this issue May 30, 2024 · 7 comments
Closed

Distorted shape when dragging the columns #1254

Issamdnn opened this issue May 30, 2024 · 7 comments
Labels
Milestone

Comments

@Issamdnn
Copy link

When Dragging the columns it shows Distorted shape .
Darg

@joachimmarder
Copy link
Contributor

Please respect our guidelines on the project homepage for submitting bugs. Please include your version of Virtual TreeView and Delphi, and attach a sample compiling project as ZIP to your report that allows to replicate the problem. If only small changes are required, a description is sufficient how a demo projects needs to be changed in order to replicate the bug. If you already have a solution, please supply a patch file.

@joachimmarder joachimmarder added the Repro Steps Missing A smple project is needed to reprodcue and analyze the issue. See our guidelines for opening issues! label Jun 2, 2024
@Trevor-S
Copy link

Trevor-S commented Oct 3, 2024

This issue is occurring in the V8.0.3 release as well as the master repository code as at 2 October 2024 using Delphi 12.2.

The issue may be demonstrated using the "Minimal" or "Advanced (Tree in Grid Simulation)" demo applications by dragging the Tree column header with the mouse. The Drag image leaves artifacts during the dragging.

Additionally, when the DPI awareness is set to "DPI Unaware" on a Monitor with Scale greater than 100%, the drag image is positioned (offset) a far distance from the mouse. The further you move the mouse to the right or below the tree, the further away the drag image moves away from the mouse pointer.

HTH

@joachimmarder
Copy link
Contributor

A very similar issue was discussed intensively in 2016 in issue #248.

@joachimmarder joachimmarder added Bug and removed Repro Steps Missing A smple project is needed to reprodcue and analyze the issue. See our guidelines for opening issues! labels Oct 3, 2024
@joachimmarder
Copy link
Contributor

One possible solution could be implementing #806 and let Windows do the drawing.

joachimmarder added a commit that referenced this issue Oct 5, 2024
joachimmarder added a commit that referenced this issue Oct 5, 2024
@joachimmarder
Copy link
Contributor

I have now implemented column header drag and drop using Windows drag and drop, and it looks promising so far. I would appreciate it if several people could do some testing.

@joachimmarder joachimmarder added this to the V8.1 milestone Oct 5, 2024
@Trevor-S
Copy link

Trevor-S commented Oct 9, 2024

Thanks Joachim,
I have done basic testing using the Advance.exe demo and my own applications.

Delphi 12.2, Dual Monitor, 3840x2160 @125% and 1920x1080 @100%

In both DPI Monitor V2 and DPI Unaware the Draw image is operating correctly, keeping with the mouse cursor and scaled appropriately when moved between screens. No more drag drawing artifacts.

However, when the header is dragged over the Delphi 12.2 IDE edit window:
- the application hangs if debugging the application in the IDE,
- or an AV error is encountered if running the application outside the debugger.
In both cases, the application must be terminated using end task. This does NOT occur for me dragging over the Delphi 11.3 IDE edit window, nor does it occur in other applications I have tried dragging over including One Note, MS Word, VS code, Edge and Windows Explorer. Additionally, I haven't had an opportunity yet to investigate whether any of the IDE extensions could be the culprit.

image

I will continue using and testing.

@joachimmarder
Copy link
Contributor

However, when the header is dragged over the Delphi 12.2 IDE edit window:

  • the application hangs if debugging the application in the IDE,

I can confirm this. It is not a new behavior, it also occurs when using drag&drop with tree nodes. So it is a separate issue. I suppose it is a result of a bad drop target implementation in RAD Studio, especially since it does not occur with any other application. It shouldn't hurt too much in an average situation.

joachimmarder added a commit that referenced this issue Oct 11, 2024
…rag(). Removed some unused members fromTVTDragImage. Issue #1254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants