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 control the hint position 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
30-Aug-02
Category
Others
Language
Delphi 2.x
Views
81
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

How do I force hints to be shown where I want? The hint for a stringgrid currently 
is showing up right below it, where it doesn't get noticed if the user is moving 
his/ her mouse over the top of the grid and the grid is large. Ideally I'd want 
that little yellow boxed hint to show as close to the cursor as possible.

Answer:
1   
2   procedure TArrangerForm.AppShowHint(var HintStr: string; var CanShow: Boolean;
3     var HintInfo: THintInfo);
4   var
5     i: integer;
6   begin
7     with HintInfo do
8     begin
9       if (HintControl = LocatorPanel1) then
10        with LocatorPanel1 do
11        begin
12          if not (csLButtonDown in ControlState) then
13          begin
14            i := FindListMarker(CursorPos.X);
15            if (i >= 0) then
16            begin
17              HintPos := 
18  ClientToScreen(Point(TimeToPixel(MarkerList.Markers[i].Offset) + 10, 2));
19              Application.HintPause := 0;
20              Application.HintHidePause := MaxInt;
21              CanShow := True;
22              exit;
23            end;
24          end;
25          CanShow := False;
26        end;
27    end;
28    Application.HintPause := 800;
29    Application.HintHidePause := 2500;
30  end;


			
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