?
Solved

Drawing problem with own DragImage in Treeview

Posted on 2005-03-04
3
Medium Priority
?
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

771 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