Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to Display different hints for each node in a TTreeView Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
31-Oct-02
Category
Others
Language
Delphi 3.x
Views
91
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

I want to display a hint on a TTreeView which varies from node to node. So I get 
the node over which the mouse is in the MouseMove event and change the Hint 
property of the TreeView.

Answer:

Our ElTree has own hints for every item and we did the following:

1   { ... }
2   if (FHintItemEx <> nil) or (not ShowHint) then
3   begin
4     Application.Hint := FOwner.FRealHint;
5     Hint := FOwner.FRealHint;
6     TSI := GetItemAt(message.XPos, message.YPos, IP, HCol);
7     if (TSI <> nil) then
8     begin
9       if (FHintItemEx <> TSI) then
10      begin
11        if Length(TSI.Hint) > 0 then
12        begin
13          Application.Hint := TSI.Hint;
14          Hint := TSI.Hint;
15        end;
16        if ShowHint and (not FInDragging) then
17        begin
18          P := ClientToScreen(SmallPointToPoint(message.Pos));
19  {$IFDEF VCL_5_USED}
20          Application.ActivateHint(P);
21  {$ELSE}
22          MoveMemory(@AMsg, @message, sizeof(AMsg));
23          TWMMouse(AMsg).XPos := -10000;
24          TWMMouse(AMsg).YPos := -10000;
25          Application.HintMouseMessage(Self, AMsg);
26          TWMMouse(AMsg).Pos := message.Pos;
27          Application.HintMouseMessage(Self, AMsg);
28  {$ENDIF}
29        end;
30      end;
31    end;
32  end;
33  { ... }


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC