?
Solved

URGENT:  TTreeView: when dragging a treenode the tree control does not scroll vertically

Posted on 2003-03-17
5
Medium Priority
?
175 Views
Last Modified: 2012-05-04
If I have a long list of nodes in the tree, and the user selects the bottom node, and the root node is not displayed in the tree control (say the top 10 nodes are not displayed because they can't fit on the screen), the user drags the node up attempting to drop on the root but the treeview control does not scroll upwards so the user can get to the root.

PLEASE HELP ME!!!
0
Comment
Question by:gretzky_owns_u
[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
5 Comments
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 8155095
It should do it automatically.  It does with all the apps I've written with treeviews in them (regardless of Windows and Delphi version).

Stu
0
 
LVL 1

Author Comment

by:gretzky_owns_u
ID: 8155121
It doesn't. I use dmAutomatic drag mode.  I've found the code:
  If (y < 15) then //upper edge - scroll up
    SendMessage(tv.Handle, WM_VSCROLL, SB_LINEUP, 0)
  else If (tv.Height-y < 15) then //lower edge - scroll down
    SendMessage(tv.Handle, WM_VSCROLL, SB_LINEDOWN, 0);

  if (x < 15) then //left edge - scoll left
    SendMessage(tv.Handle, WM_HSCROLL, SB_LINELEFT, 0)
  else if (tv.Width - x < 15) then //right edge - scroll right
    SendMessage(tv.Handle, WM_HSCROLL, SB_LINERIGHT, 0);

0
 

Expert Comment

by:CleanupPing
ID: 9316747
gretzky_owns_u:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10639956
PAQed, with points refunded (20)

modulo
Community Support Moderator
0

Featured Post

Independent Software Vendors: 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 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