Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Drawing problem with own DragImage in Treeview

Posted on 2005-03-04
3
Medium Priority
?
273 Views
Last Modified: 2010-04-05
Hi experts,

if I use a own DragImage within a class, derived from TDragObject, then they
nodes are not correctly drawn while I move with the DragImage over the treenodes?
If I move beside the treenodes they are drawn correctly!

I think that anyone is wrong in my use of TDragObject???

Can anyone help me??

regards

William
0
Comment
Question by:SirWinston8
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Jacco earned 2000 total points
ID: 13465056
I have seen the problem before. The cause might be that you change the treeview while dragging over it. (Selecting or Focussing items).

I think you have to do HideImage then refresh the TreeView (or whatever it is you do) and after that a ShowImage again (I believe those are methods on TDragObject.

Hope this solves your problem. If not you could always try and paste some code so I can have a go at correcting the problem.

Regards Jacco
0
 
LVL 10

Expert Comment

by:Jacco
ID: 13465058
I mean paste some code here :)
0
 

Author Comment

by:SirWinston8
ID: 13465140
Thank you for your fast help!

You take me on the right way, I forget to override these methods in my DragObject:

procedure TMyDragObject.ShowDragImage;
begin
  FDragImages.ShowDragImage;
end;

procedure TMyDragObject.HideDragImage;
begin
  FDragImages.HideDragImage;
end;

To refresh the Treeview is not neccesary!

Regards

William
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question